ci(pr): post extension download link on PR builds#29
Conversation
Add a step to the CI build job that comments on the PR with a direct download link to the built extension artifact, so reviewers can install it without checking out the branch locally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis pull request updates the CI workflow to declare Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Extension build ready for testingDownload the build, unzip it, then load it as an unpacked extension at Built from 93e0068 — workflow run |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 7-9: The workflow-level permissions block currently sets only
pull-requests: write which causes unspecified scopes to default to none and
breaks actions/checkout@v4; update the permissions map in the CI workflow to
include contents: read alongside pull-requests: write so the checkout step can
read repository contents (i.e., add "contents: read" under the existing
permissions stanza).
- Around line 71-77: The code uses github.rest.issues.listComments which only
returns the first page (30) so the marker search can miss comments; replace the
single-page fetch with a paginated fetch (e.g., use github.paginate or loop over
pages) to collect all comments before searching. Specifically, call
github.paginate(github.rest.issues.listComments, { owner: context.repo.owner,
repo: context.repo.repo, issue_number: context.issue.number }) (or equivalent
paging loop), then search the resulting array for c.body.includes(marker) and
assign to existing, keeping the same marker/context variables and downstream
logic.
- Around line 54-93: The PR comment step ("Comment on PR with download link")
fails for forked PRs because the GITHUB_TOKEN is read-only; guard the step by
adding a conditional that skips it for forked PRs (e.g. add if:
github.event.pull_request.head.repo.fork == false or if:
github.event.pull_request.head.repo.full_name == github.repository) so the
script calling github.rest.issues.createComment and
github.rest.issues.updateComment only runs when the PR originates from the same
repo.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c976f03c-8c20-4d6d-bf15-5c759436fc57
📒 Files selected for processing (1)
.github/workflows/ci.yml
- Add contents: read to workflow permissions so checkout works regardless of repo-level GITHUB_TOKEN defaults - Skip comment step on fork PRs where the token is read-only - Use github.paginate for comment listing to avoid missing the marker on PRs with 30+ comments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
buildjob that posts a comment on the PR with a direct download link to the built extension artifactTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit