mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 18:18:43 +00:00
fix(ci): degrade timed-out ai reviews gracefully
This commit is contained in:
@@ -478,6 +478,7 @@ jobs:
|
|||||||
- name: Run Claude Code Review
|
- name: Run Claude Code Review
|
||||||
id: claude-review
|
id: claude-review
|
||||||
timeout-minutes: ${{ fromJSON(needs.prepare.outputs.claude_timeout_minutes) }}
|
timeout-minutes: ${{ fromJSON(needs.prepare.outputs.claude_timeout_minutes) }}
|
||||||
|
continue-on-error: true
|
||||||
uses: anthropics/claude-code-action@v1
|
uses: anthropics/claude-code-action@v1
|
||||||
with:
|
with:
|
||||||
anthropic_api_key: ${{ secrets.GLM_API_KEY }}
|
anthropic_api_key: ${{ secrets.GLM_API_KEY }}
|
||||||
@@ -602,7 +603,7 @@ jobs:
|
|||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
- name: Add success reaction
|
- name: Add success reaction
|
||||||
if: success() && github.event_name == 'issue_comment'
|
if: success() && github.event_name == 'issue_comment' && steps.claude-review.outcome == 'success'
|
||||||
run: |
|
run: |
|
||||||
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
|
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
|
||||||
--method POST -f content=rocket
|
--method POST -f content=rocket
|
||||||
@@ -610,7 +611,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
||||||
- name: Add failure reaction
|
- name: Add failure reaction
|
||||||
if: failure() && github.event_name == 'issue_comment'
|
if: always() && github.event_name == 'issue_comment' && (failure() || steps.claude-review.outcome == 'failure')
|
||||||
run: |
|
run: |
|
||||||
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
|
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
|
||||||
--method POST -f content=confused
|
--method POST -f content=confused
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ describe('ai-review workflow', () => {
|
|||||||
const claudeReviewStep = steps.find((step) => step.id === 'claude-review');
|
const claudeReviewStep = steps.find((step) => step.id === 'claude-review');
|
||||||
expect(claudeReviewStep).toBeDefined();
|
expect(claudeReviewStep).toBeDefined();
|
||||||
expect(claudeReviewStep?.uses).toBe('anthropics/claude-code-action@v1');
|
expect(claudeReviewStep?.uses).toBe('anthropics/claude-code-action@v1');
|
||||||
|
expect(claudeReviewStep?.['continue-on-error']).toBe(true);
|
||||||
expect(claudeReviewStep?.with?.path_to_claude_code_executable).toBe(
|
expect(claudeReviewStep?.with?.path_to_claude_code_executable).toBe(
|
||||||
'${{ steps.toolchain.outputs.claude_path }}'
|
'${{ steps.toolchain.outputs.claude_path }}'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user