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_dispatch
| @@ -18,24 +18,25 @@ | ||
| 18 | 18 | ISSUE_URL: ${{ github.event.issue.html_url }} |
| 19 | 19 | ISSUE_NUMBER: ${{ github.event.issue.number }} |
| 20 | 20 | ISSUE_TITLE: ${{ github.event.issue.title }} |
| 21 | - INTERNAL_WORKFLOW: ${{ secrets.ISSUE_NOTIFY_WORKFLOW_NAME }} | |
| 22 | 21 | TARGET_REPO: ${{ secrets.ISSUE_NOTIFY_TARGET_REPO }} |
| 23 | - GH_TOKEN: ${{ github.token }} | |
| 22 | + GH_TOKEN: ${{ secrets.ISSUE_NOTIFY_TOKEN || github.token }} | |
| 24 | 23 | run: | |
| 25 | 24 | # Check if internal processing is configured |
| 26 | - if [ -z "$INTERNAL_WORKFLOW" ] || [ -z "$TARGET_REPO" ]; then | |
| 25 | + if [ -z "$TARGET_REPO" ]; then | |
| 27 | 26 | echo "Internal processing not configured" |
| 28 | 27 | exit 0 |
| 29 | 28 | fi |
| 30 | 29 | |
| 31 | 30 | echo "Processing issue #${ISSUE_NUMBER}" |
| 32 | 31 | |
| 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)" | |
| 38 | 39 | exit 0 |
| 39 | 40 | } |
| 40 | 41 | |
| 41 | - echo "✅ Issue processed" | |
| 42 | + echo "✅ Issue processed and dispatched to ${TARGET_REPO}" |