History

chore: forward issue/PR/discussion events to Cursor hygiene (#9518)

Julius Marminge committed 2 months ago

Commit 44701ef1 parent 9c9ae3d1 file · +40 −0Browse files

Unified · Split

.github/workflows/cursor-hygiene-webhook.yml+40−0
@@ -0,0 +1,40 @@
1+name: Forward to Cursor hygiene
2+
3+on:
4+ push:
5+ branches: [main]
6+ pull_request:
7+ types: [opened, reopened, ready_for_review]
8+ issues:
9+ types: [opened, closed, reopened]
10+ discussion:
11+ types: [created, closed, reopened]
12+ issue_comment:
13+ types: [created]
14+ discussion_comment:
15+ types: [created]
16+
17+permissions:
18+ contents: read
19+
20+jobs:
21+ forward:
22+ name: POST to Cursor
23+ runs-on: ubuntu-24.04
24+ steps:
25+ - name: POST to Cursor
26+ env:
27+ URL: ${{ secrets.CURSOR_T3CODE_WEBHOOK_URL }}
28+ AUTH: ${{ secrets.CURSOR_T3CODE_WEBHOOK_AUTH }}
29+ run: |
30+ set -euo pipefail
31+ if [ -z "${URL:-}" ] || [ -z "${AUTH:-}" ]; then
32+ echo "Missing CURSOR_T3CODE_WEBHOOK_URL or CURSOR_T3CODE_WEBHOOK_AUTH — skipping."
33+ exit 0
34+ fi
35+ curl -fsS --max-time 60 -X POST "$URL" \
36+ -H "Authorization: $AUTH" \
37+ -H "Content-Type: application/json" \
38+ -H "X-GitHub-Event: ${{ github.event_name }}" \
39+ -H "X-GitHub-Delivery: ${{ github.run_id }}-${{ github.run_attempt }}" \
40+ --data-binary @"${{ github.event_path }}"