Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/claude-review-ext-stage1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

permissions:
contents: read
pull-requests: read
pull-requests: write # Need write to post comments

steps:
- name: Checkout PR code
Expand Down Expand Up @@ -196,6 +196,7 @@ jobs:
- name: Post Status Comment
if: github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment'
uses: actions/github-script@v7
continue-on-error: true # Don't fail the workflow if comment posting fails
with:
script: |
const prNumber = ${{ steps.pr-info.outputs.pr_number }};
Expand All @@ -210,13 +211,19 @@ jobs:
statusMessage += `📋 Stage 2 (Claude Review) will run automatically after this workflow completes.\n`;
statusMessage += `This two-stage process ensures secure handling of forked PRs.`;

// Post comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: statusMessage
});
try {
// Post comment on the PR
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: statusMessage
});
console.log(`Successfully posted status comment on PR #${prNumber}`);
} catch (error) {
console.log(`Warning: Could not post comment on PR #${prNumber}: ${error.message}`);
console.log('This is expected for some permission scenarios. Stage 2 will still run.');
}

- name: Job Summary
run: |
Expand Down