diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 3335131..6ddf5f3 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -30,7 +30,7 @@ jobs: needs.check-team-member.outputs.is-team-member == 'true' && github.actor != 'github-actions[bot]' && github.event.issue.pull_request && - contains(github.event.comment.body, '/claude /full-review') + contains(github.event.comment.body, '@claude /full-review') runs-on: ubuntu-latest timeout-minutes: 10 concurrency: diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index be7c9dc..0dfdf2c 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -36,10 +36,10 @@ jobs: needs.check-team-member.outputs.is-team-member == 'true' && github.actor != 'github-actions[bot]' && ( - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/claude') && !contains(github.event.comment.body, '/claude /full-review')) || - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/claude') && !contains(github.event.comment.body, '/claude /full-review')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '/claude') && !contains(github.event.review.body, '/claude /full-review')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '/claude') || contains(github.event.issue.title, '/claude'))) + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude /full-review')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude /full-review')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && !contains(github.event.review.body, '@claude /full-review')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) ) runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/.github/workflows/codex-comment.yml b/.github/workflows/codex-comment.yml index dc04d23..f10b0a7 100644 --- a/.github/workflows/codex-comment.yml +++ b/.github/workflows/codex-comment.yml @@ -133,28 +133,34 @@ jobs: name: Post Codex reply runs-on: ubuntu-latest needs: run-codex - if: | - needs.run-codex.result == 'success' && - needs.run-codex.outputs.final_message != '' + if: always() && needs.run-codex.result == 'success' permissions: issues: write pull-requests: write steps: + - name: Debug outputs + run: | + echo "Final message length: ${#FINAL_MESSAGE}" + echo "Issue number: ${{ github.event.issue.number }}" + env: + FINAL_MESSAGE: ${{ needs.run-codex.outputs.final_message }} + - name: Reply with Codex output + if: needs.run-codex.outputs.final_message uses: actions/github-script@v7 - env: - CODEX_FINAL_MESSAGE: ${{ needs.run-codex.outputs.final_message }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const body = process.env.CODEX_FINAL_MESSAGE; - if (!body) { + const body = `${{ needs.run-codex.outputs.final_message }}`; + if (!body || body.trim() === '') { core.info('No Codex output to post.'); return; } + console.log('Posting comment with length:', body.length); await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, - issue_number: context.issue.number, + issue_number: ${{ github.event.issue.number }}, body }); + console.log('Comment posted successfully');