From bdd441e1257750edef96c1e7498827c84f06b7f1 Mon Sep 17 00:00:00 2001 From: Edmond Sabou Date: Wed, 15 Jul 2026 15:39:52 +0300 Subject: [PATCH] ci: add Slack notification workflow for teammate PRs to main Fires on pull_request opened/ready_for_review targeting main, skips drafts, and posts a Slack message to the channel behind the SLACK_WEBHOOK_URL secret. Author is filtered against the TEAMMATE_HANDLES repo variable (JSON array of GitHub usernames), so the list is editable in the GitHub UI without a PR. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/notify-slack-pr-review.yml | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/notify-slack-pr-review.yml diff --git a/.github/workflows/notify-slack-pr-review.yml b/.github/workflows/notify-slack-pr-review.yml new file mode 100644 index 000000000000..5e76cb89b5a0 --- /dev/null +++ b/.github/workflows/notify-slack-pr-review.yml @@ -0,0 +1,37 @@ +name: Notify Slack on PR ready for review + +on: + pull_request: + types: [opened, ready_for_review] + branches: [main] + +permissions: + contents: read + pull-requests: read + +jobs: + notify: + if: >- + github.event.pull_request.draft == false && + contains(fromJSON(vars.TEAMMATE_HANDLES), github.event.pull_request.user.login) + runs-on: ubuntu-latest + steps: + - name: Post to Slack + uses: slackapi/slack-github-action@v1.27.0 + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "text": ":memo: New PR ready for review: ${{ github.event.pull_request.title }}", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":memo: *<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>*\nNew PR from *${{ github.event.pull_request.user.login }}* — ready for review." + } + } + ] + }