diff --git a/.github/workflows/slack-notify.yml b/.github/workflows/slack-notify.yml new file mode 100644 index 0000000..1453839 --- /dev/null +++ b/.github/workflows/slack-notify.yml @@ -0,0 +1,29 @@ +name: Notify Maintainer + +on: + pull_request: + types: [opened, reopened] + branches: + - main + +jobs: + notify: + name: Send Slack Notification + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Send GitHub Action trigger data to Slack workflow + id: slack + uses: slackapi/slack-github-action@v1.21.0 + with: + payload: | + { + "repoName": "${{ github.repository }}", + "prNumber": "${{ github.event.pull_request.number }}", + "requester ": "${{ github.actor }}", + "link": "${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file