spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / .github / workflows / issue-notify.yml
Iñigo Beitia ArévaloAdd workflow configuration c0a28ee · on Sep 3, 2025 History
59 lines · 2.0 KBRaw
1name: Issue Notification
2
3on:
4 issues:
5 types: [opened]
6
7permissions:
8 issues: read
9
10jobs:
11 notify:
12 runs-on: ubuntu-latest
13 timeout-minutes: 5
14 steps:
15 - name: Send notification
16 env:
17 ISSUE_NUMBER: ${{ github.event.issue.number }}
18 ISSUE_TITLE: ${{ github.event.issue.title }}
19 ISSUE_BODY: ${{ github.event.issue.body }}
20 ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
21 ISSUE_LABELS: ${{ toJSON(github.event.issue.labels) }}
22 ISSUE_URL: ${{ github.event.issue.html_url }}
23 ISSUE_CREATED_AT: ${{ github.event.issue.created_at }}
24 REPOSITORY: ${{ github.repository }}
25 DISPATCH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN_CLAUDE_CODE }}
26 DISPATCH_ENDPOINT: ${{ secrets.DISPATCH_ENDPOINT }}
27 run: |
28 if [ -z "$DISPATCH_TOKEN" ] || [ -z "$DISPATCH_ENDPOINT" ]; then
29 echo "Dispatch configuration not complete, skipping notification"
30 exit 0
31 fi
32
33 # Prepare payload with issue metadata
34 PAYLOAD=$(cat <<EOF
35 {
36 "event_type": "issue_event",
37 "client_payload": {
38 "source_repo": "$REPOSITORY",
39 "issue_number": "$ISSUE_NUMBER",
40 "issue_title": $(echo "$ISSUE_TITLE" | jq -Rs .),
41 "issue_body": $(echo "$ISSUE_BODY" | jq -Rs .),
42 "issue_author": "$ISSUE_AUTHOR",
43 "issue_labels": $ISSUE_LABELS,
44 "issue_url": "$ISSUE_URL",
45 "issue_created_at": "$ISSUE_CREATED_AT",
46 "timestamp": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
47 }
48 }
49 EOF
50 )
51
52 # Send notification to configured endpoint
53 curl -X POST \
54 -H "Accept: application/vnd.github.v3+json" \
55 -H "Authorization: token $DISPATCH_TOKEN" \
56 -H "Content-Type: application/json" \
57 "$DISPATCH_ENDPOINT" \
58 -d "$PAYLOAD" \
59 --fail-with-body || echo "Notification sent"