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

Merge pull request #7192 from anthropics/inigo/update-issue-notify-repository-dispatchBrowse files
feat: update issue-notify to use repository_dispatch
bogini authored on Sep 5, 2025 · GitHub committed on Sep 5, 2025 parents 3404b07 + 156d9e9 · commit 5c2a1e1d2e14
1 changed file+10 -9compared with 3404b07
M.github/workflows/issue-notify.yml
@@ -18,24 +18,25 @@
1818 ISSUE_URL: ${{ github.event.issue.html_url }}
1919 ISSUE_NUMBER: ${{ github.event.issue.number }}
2020 ISSUE_TITLE: ${{ github.event.issue.title }}
21- INTERNAL_WORKFLOW: ${{ secrets.ISSUE_NOTIFY_WORKFLOW_NAME }}
2221 TARGET_REPO: ${{ secrets.ISSUE_NOTIFY_TARGET_REPO }}
23- GH_TOKEN: ${{ github.token }}
22+ GH_TOKEN: ${{ secrets.ISSUE_NOTIFY_TOKEN || github.token }}
2423 run: |
2524 # Check if internal processing is configured
26- if [ -z "$INTERNAL_WORKFLOW" ] || [ -z "$TARGET_REPO" ]; then
25+ if [ -z "$TARGET_REPO" ]; then
2726 echo "Internal processing not configured"
2827 exit 0
2928 fi
3029
3130 echo "Processing issue #${ISSUE_NUMBER}"
3231
33- # Trigger internal workflow if configured
34- gh workflow run "$INTERNAL_WORKFLOW" \
35- --repo "$TARGET_REPO" \
36- --field issue_url="$ISSUE_URL" 2>/dev/null || {
37- echo "Issue notification sent"
32+ # Trigger internal workflow via repository_dispatch
33+ gh api repos/${TARGET_REPO}/dispatches \
34+ --method POST \
35+ -H "Accept: application/vnd.github.v3+json" \
36+ -f event_type="issue-opened" \
37+ -f "client_payload[issue_url]=${ISSUE_URL}" 2>/dev/null || {
38+ echo "Issue notification sent (dispatch may have failed due to permissions)"
3839 exit 0
3940 }
4041
41- echo "✅ Issue processed"
42+ echo "✅ Issue processed and dispatched to ${TARGET_REPO}"