diff --git a/.github/workflows/issue-response-handler.yml b/.github/workflows/issue-response-handler.yml new file mode 100644 index 00000000..02b02ae9 --- /dev/null +++ b/.github/workflows/issue-response-handler.yml @@ -0,0 +1,36 @@ +name: Issue Response Handler + +on: + issues: + types: [opened] + +jobs: + respond: + runs-on: ubuntu-latest + steps: + - name: Post Comment for 'bug' + if: contains(github.event.issue.labels.*.name, 'bug') + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"body":"Hello, @${{ github.event.issue.user.login }}\nThank you for reporting a bug. I will take a look at it as soon as possible and let you know of any updates.\nCheers"}' \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments + + - name: Post Comment for 'feature-request' + if: contains(github.event.issue.labels.*.name, 'feature-request') + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"body":"Hello, @${{ github.event.issue.user.login }}\nThank you for your feature request. I will review it as soon as possible and provide updates as they become available.\nCheers"}' \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments + + - name: Post Comment for 'help-wanted' + if: contains(github.event.issue.labels.*.name, 'help-wanted') + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"body":"Hello, @${{ github.event.issue.user.login }}\nThank you for reaching out. I will do my best to assist you as quickly as possible and will keep you updated on my progress.\nCheers"}' \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments