From 2c0d60e8a7576b2958dd4bad9bf0256201cc451d Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 5 Apr 2023 16:35:55 -0700 Subject: [PATCH 1/5] Add an automation to close issue with response if Python2.7 was selected --- .github/workflows/python27-issue-response.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/python27-issue-response.yml diff --git a/.github/workflows/python27-issue-response.yml b/.github/workflows/python27-issue-response.yml new file mode 100644 index 000000000000..f4cdabe156c4 --- /dev/null +++ b/.github/workflows/python27-issue-response.yml @@ -0,0 +1,16 @@ +name: Python 2.7 Issue Response + +on: + issues: + types: [opened] + +jobs: + python27-issue-response: + runs-on: ubuntu-latest + steps: + - name: Check for Python 2.7 string + if: contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') + run: | + response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif](https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif)" + gh issue comment ${{ github.event.issue.number }} --body "$response" + gh issue close ${{ github.event.issue.number }} From 5f50ba7249e7746e2539e76e3686bf278b5c94d5 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 6 Apr 2023 14:14:54 -0700 Subject: [PATCH 2/5] Fix lint --- .github/workflows/python27-issue-response.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python27-issue-response.yml b/.github/workflows/python27-issue-response.yml index f4cdabe156c4..339337cef51b 100644 --- a/.github/workflows/python27-issue-response.yml +++ b/.github/workflows/python27-issue-response.yml @@ -7,9 +7,10 @@ on: jobs: python27-issue-response: runs-on: ubuntu-latest + if: ${{ contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') }} steps: - name: Check for Python 2.7 string - if: contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') + if: ${{ contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') }} run: | response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif](https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif)" gh issue comment ${{ github.event.issue.number }} --body "$response" From cf3878cb6d556e3ec0da84847d4f6ed7713cff7e Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 6 Apr 2023 14:17:28 -0700 Subject: [PATCH 3/5] Fix lint --- .github/workflows/python27-issue-response.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python27-issue-response.yml b/.github/workflows/python27-issue-response.yml index 339337cef51b..68231d38bdcd 100644 --- a/.github/workflows/python27-issue-response.yml +++ b/.github/workflows/python27-issue-response.yml @@ -7,10 +7,9 @@ on: jobs: python27-issue-response: runs-on: ubuntu-latest - if: ${{ contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') }} + if: contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') steps: - name: Check for Python 2.7 string - if: ${{ contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') }} run: | response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif](https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif)" gh issue comment ${{ github.event.issue.number }} --body "$response" From 804b8da76b294460ed0843faaa576bc0c9ee4d33 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 6 Apr 2023 14:18:56 -0700 Subject: [PATCH 4/5] oops --- .github/workflows/python27-issue-response.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python27-issue-response.yml b/.github/workflows/python27-issue-response.yml index 68231d38bdcd..1671b928d2ac 100644 --- a/.github/workflows/python27-issue-response.yml +++ b/.github/workflows/python27-issue-response.yml @@ -11,6 +11,6 @@ jobs: steps: - name: Check for Python 2.7 string run: | - response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif](https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif)" + response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif]" gh issue comment ${{ github.event.issue.number }} --body "$response" gh issue close ${{ github.event.issue.number }} From fe712ab62d09619aaf522255135bd4107edfdafe Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 6 Apr 2023 14:24:27 -0700 Subject: [PATCH 5/5] Try --- .github/workflows/python27-issue-response.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python27-issue-response.yml b/.github/workflows/python27-issue-response.yml index 1671b928d2ac..4d51e9921ab4 100644 --- a/.github/workflows/python27-issue-response.yml +++ b/.github/workflows/python27-issue-response.yml @@ -1,5 +1,3 @@ -name: Python 2.7 Issue Response - on: issues: types: [opened] @@ -7,10 +5,10 @@ on: jobs: python27-issue-response: runs-on: ubuntu-latest - if: contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7') + if: "contains(github.event.issue.body, 'Python version (& distribution if applicable, e.g. Anaconda): 2.7')" steps: - name: Check for Python 2.7 string run: | - response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif]" + response="We're sorry, but we no longer support Python 2.7. If you need to work with Python 2.7, you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with `2.7`. Thank you for your understanding! \n ![https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif](https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif)" gh issue comment ${{ github.event.issue.number }} --body "$response" gh issue close ${{ github.event.issue.number }}