Repository navigation
ci: fix protected-main downloads badge updates - #31747
Conversation
📝 Walkthrough
Priority: ⚪ Pending latest changes Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
🧹 Nitpick comments: 1
.github/workflows/readme-downloads-badge.yml: 1
28-28: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPin
actions/create-github-app-tokento a full commit SHA.This step receives the GitHub App private key. A mutable tag such as
@v3can 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.0Based 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
📒 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.
…s-badge-pr # Conflicts: # src/renderer/src/components/native-chat/NativeChatQueuedMessageEditor.test.tsx # src/renderer/src/i18n/locales/pt.json
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
Agent skill upstream boundary