diff --git a/.github/workflows/thank_contributors.yaml b/.github/workflows/thank_contributors.yaml new file mode 100644 index 0000000..f941bcb --- /dev/null +++ b/.github/workflows/thank_contributors.yaml @@ -0,0 +1,20 @@ +name: Thank Contributors + +on: + pull_request: + t/ypes: [closed] + +jobs: + thank_contributor: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Thank the contributor + run: | + curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -X POST \ + -d "{\"body\": \"Thanks for your contribution @${{ github.event.pull_request.user.login }}\"}" \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"