Skip to content

Commit cd347dd

Browse files
Add Cursor hygiene webhook forwarder
1 parent 8ea52c8 commit cd347dd

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)