Skip to content

Commit 6bab4cc

Browse files
authored
ci: fix Claude trigger pattern and Codex post-comment job (#121)
1 parent 0ffa131 commit 6bab4cc

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
needs.check-team-member.outputs.is-team-member == 'true' &&
3131
github.actor != 'github-actions[bot]' &&
3232
github.event.issue.pull_request &&
33-
contains(github.event.comment.body, '/claude /full-review')
33+
contains(github.event.comment.body, '@claude /full-review')
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 10
3636
concurrency:

.github/workflows/claude.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
needs.check-team-member.outputs.is-team-member == 'true' &&
3737
github.actor != 'github-actions[bot]' &&
3838
(
39-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '/claude') && !contains(github.event.comment.body, '/claude /full-review')) ||
40-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/claude') && !contains(github.event.comment.body, '/claude /full-review')) ||
41-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '/claude') && !contains(github.event.review.body, '/claude /full-review')) ||
42-
(github.event_name == 'issues' && (contains(github.event.issue.body, '/claude') || contains(github.event.issue.title, '/claude')))
39+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude /full-review')) ||
40+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude /full-review')) ||
41+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && !contains(github.event.review.body, '@claude /full-review')) ||
42+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
4343
)
4444
runs-on: ubuntu-latest
4545
timeout-minutes: 10

.github/workflows/codex-comment.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,28 +133,34 @@ jobs:
133133
name: Post Codex reply
134134
runs-on: ubuntu-latest
135135
needs: run-codex
136-
if: |
137-
needs.run-codex.result == 'success' &&
138-
needs.run-codex.outputs.final_message != ''
136+
if: always() && needs.run-codex.result == 'success'
139137
permissions:
140138
issues: write
141139
pull-requests: write
142140
steps:
141+
- name: Debug outputs
142+
run: |
143+
echo "Final message length: ${#FINAL_MESSAGE}"
144+
echo "Issue number: ${{ github.event.issue.number }}"
145+
env:
146+
FINAL_MESSAGE: ${{ needs.run-codex.outputs.final_message }}
147+
143148
- name: Reply with Codex output
149+
if: needs.run-codex.outputs.final_message
144150
uses: actions/github-script@v7
145-
env:
146-
CODEX_FINAL_MESSAGE: ${{ needs.run-codex.outputs.final_message }}
147151
with:
148152
github-token: ${{ secrets.GITHUB_TOKEN }}
149153
script: |
150-
const body = process.env.CODEX_FINAL_MESSAGE;
151-
if (!body) {
154+
const body = `${{ needs.run-codex.outputs.final_message }}`;
155+
if (!body || body.trim() === '') {
152156
core.info('No Codex output to post.');
153157
return;
154158
}
159+
console.log('Posting comment with length:', body.length);
155160
await github.rest.issues.createComment({
156161
owner: context.repo.owner,
157162
repo: context.repo.repo,
158-
issue_number: context.issue.number,
163+
issue_number: ${{ github.event.issue.number }},
159164
body
160165
});
166+
console.log('Comment posted successfully');

0 commit comments

Comments
 (0)