Skip to content

Commit 6136f34

Browse files
committed
ci: Slack notification on Copilot review (optional via SLACK_WEBHOOK_URL)
1 parent b68913a commit 6136f34

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/copilot-review-notify.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,11 @@ jobs:
2626
issue_number: number,
2727
body: `Automated: GitHub Copilot has submitted a review for ${url}.`
2828
});
29-
29+
- name: Optional Slack notify
30+
if: ${{ secrets.SLACK_WEBHOOK_URL != '' }}
31+
env:
32+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
33+
run: |
34+
pr_url="${{ github.event.pull_request.html_url }}"
35+
payload=$(jq -n --arg text "Copilot reviewed $pr_url" '{text: $text}')
36+
curl -X POST -H 'Content-type: application/json' --data "$payload" "$SLACK_WEBHOOK_URL"

0 commit comments

Comments
 (0)