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

feat: update issue-notify to use repository_dispatchBrowse files
Switch from workflow_dispatch to repository_dispatch for cross-repo
triggering of issue-detective workflow in claude-cli-internal.

Changes:
- Use gh api with repository_dispatch endpoint
- Send issue_url in client_payload
- Support ISSUE_NOTIFY_TOKEN secret for better permissions
- Remove dependency on ISSUE_NOTIFY_WORKFLOW_NAME secret

This enables automatic issue detective analysis when issues are
opened in claude-code repository.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
inigo authored on Sep 5, 2025 parent 3404b07 · commit 156d9e9e3faa
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}"