Skip to content

ci: fix protected-main downloads badge updates - #31747

Merged
nwparker merged 4 commits into
mainfrom
nwparker/fix-downloads-badge-pr
Oct 22, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/fix-downloads-badge-pr

Conversation

@nwparker

@nwparker nwparker commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​43 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​37

ELI5

The downloads-badge job on main fails because it pushes directly to a branch that requires pull requests. It now proposes badge updates through a normal PR.

What Changed

Use the existing buf0-bot app with repository-scoped contents/PR permissions. Push only the dedicated automation branch, protected by an explicit force-with-lease, and reuse an existing open badge PR. App-created PRs trigger normal CI. An unchanged badge does nothing.

Why

Fixes the GH013 rejection in main run 39702678039 while respecting branch protection. No bypass permission or main push is needed.

Linked Issue

Maintainer-requested repair of failing main automation.

Visual Proof

N/A — workflow-only change; no product UI or interaction changes.

Testing

  • Exercised the exact proposal shell against a local bare Git repository: new PR, existing PR update, unchanged badge. Main remained unchanged in all scenarios; only the SVG changed on the automation branch.
  • Existing badge renderer test passed on macOS with ORCA_BACKGROUND_LAUNCH=1.
  • Workflow actionlint and whitespace checks passed.
  • Live dispatch passed using the existing app: run 39703237269, which opened badge PR Update README downloads badge #31749 without writing main.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer source or related assets copied.

@nwparker nwparker changed the title ci: fix protected-main downloads badge updates ci: repair main badge automation and locale validation Oct 22, 2026
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The workflow now uses a GitHub App token for repository checkout and write operations. It exits when the badge SVG has not changed. When the SVG changes, it pushes an automation branch and creates a pull request to main unless an open pull request from that branch already exists.

Priority: ⚪ Pending latest changes

Merge Risk: 🔵 Low · up to 9b2ff

The badge PR workflow appears mergeable with owner awareness that the action handling the bot key is not pinned to a commit.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the CI fix for downloads badge updates on protected main.
Description check Passed The description covers the core change, reason, workflow-only impact, testing, and upstream boundary. It is sufficiently complete despite omitting non-critical sections such as Review, Notes, and Chec…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description covers the core change, reason, workflow-only impact, testing, and upstream boundary. It is sufficiently complete despite omitting non-critical sections such as Review, Notes, and Checklist details.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments: 1
.github/workflows/readme-downloads-badge.yml: 1

28-28: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin actions/create-github-app-token to a full commit SHA.

This step receives the GitHub App private key. A mutable tag such as @v3 can be retargeted. Pin the step to a 40-character commit SHA. Keep the version in a trailing comment.

🔒️ Proposed fix
-        uses: actions/create-github-app-token@v3
+        uses: actions/create-github-app-token@<40-char-sha> # v3.3.0

Based on learnings: "reference third-party actions by pinning to a full commit SHA (e.g., uses: owner/action@<40-char-sha>) rather than a mutable tag or branch."

Source: Learnings


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a1b2011d-84d5-45fb-8747-6b54c15d5b0e
📥 Commits

Reviewing files that changed from the base of the PR and between 2a45fdc and 9b2ff7f.

📒 Files selected for processing: 1
  • .github/workflows/readme-downloads-badge.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@nwparker nwparker changed the title ci: repair main badge automation and locale validation ci: repair main automation and test failures Oct 22, 2026
…s-badge-pr

# Conflicts:
#	src/renderer/src/components/native-chat/NativeChatQueuedMessageEditor.test.tsx
#	src/renderer/src/i18n/locales/pt.json
@nwparker nwparker changed the title ci: repair main automation and test failures ci: fix protected-main downloads badge updates Oct 22, 2026
@nwparker
nwparker merged commit bc60f69 into main Oct 22, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant