From e66b150c0e49291770282542e9129e88153d4a6d Mon Sep 17 00:00:00 2001 From: inigo Date: Thu, 4 Sep 2025 14:28:04 -0700 Subject: [PATCH] Update issue notification workflow - Simplify workflow to use built-in GitHub token - Remove external dependencies - Improve error handling and logging --- .github/workflows/issue-notify.yml | 58 +++++++++++------------------- 1 file changed, 20 insertions(+), 38 deletions(-) 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