diff --git a/.github/workflows/issue-notify.yml b/.github/workflows/issue-notify.yml index df3d2a76..d31e8cbc 100644 --- a/.github/workflows/issue-notify.yml +++ b/.github/workflows/issue-notify.yml @@ -6,54 +6,36 @@ on: permissions: issues: read + actions: write jobs: notify: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - name: Send notification + - name: Process new issue env: + ISSUE_URL: ${{ github.event.issue.html_url }} ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_TITLE: ${{ github.event.issue.title }} - ISSUE_BODY: ${{ github.event.issue.body }} - ISSUE_AUTHOR: ${{ github.event.issue.user.login }} - ISSUE_LABELS: ${{ toJSON(github.event.issue.labels) }} - ISSUE_URL: ${{ github.event.issue.html_url }} - ISSUE_CREATED_AT: ${{ github.event.issue.created_at }} - REPOSITORY: ${{ github.repository }} - DISPATCH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN_CLAUDE_CODE }} - DISPATCH_ENDPOINT: ${{ secrets.DISPATCH_ENDPOINT }} - run: | - if [ -z "$DISPATCH_TOKEN" ] || [ -z "$DISPATCH_ENDPOINT" ]; then - echo "Dispatch configuration not complete, skipping notification" + INTERNAL_WORKFLOW: ${{ secrets.ISSUE_NOTIFY_WORKFLOW_NAME }} + TARGET_REPO: ${{ secrets.ISSUE_NOTIFY_TARGET_REPO }} + GH_TOKEN: ${{ github.token }} + run: | + # Check if internal processing is configured + if [ -z "$INTERNAL_WORKFLOW" ] || [ -z "$TARGET_REPO" ]; then + echo "Internal processing not configured" exit 0 fi - # Prepare payload with issue metadata - PAYLOAD=$(cat </dev/null || { + echo "Issue notification sent" + exit 0 + } + + echo "✅ Issue processed" \ No newline at end of file