Skip to content

chore: use labels fork ignoring archived labels - #1774

Merged
browniebroke merged 1 commit into
mainfrom
all-repos_autofix_chore/labels-fork
Sep 24, 2026
Merged

browniebroke merged 1 commit into
mainfrom
all-repos_autofix_chore/labels-fork

Conversation

@browniebroke

@browniebroke browniebroke commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Committed via https://github.com/asottile/all-repos

Summary by Sourcery

Enhancements:

  • Update label synchronization to use a fork that ignores archived labels.

@sourcery-ai

sourcery-ai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The GitHub Actions label-sync job now runs the forked labels implementation from the fix/ignore-archived-at branch so archived items are excluded while preserving the existing synchronization configuration.

File-Level Changes

Change Details Files
Update the label synchronization workflow to use a forked labels package that ignores archived repositories or labels during synchronization.
  • Install the forked package directly from its GitHub branch archive via uvx.
  • Retain the existing owner, token, and labels configuration arguments for the sync command.
.github/workflows/labels.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/labels.yml" line_range="20" />
<code_context>
       - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
       - name: Sync config with Github
-        run: uvx labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
+        run: uvx --with https://github.com/browniebroke/labels/archive/fix/ignore-archived-at.zip labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
</code_context>
<issue_to_address>
**🚨 issue (security):** The workflow executes code fetched from the mutable `fix/ignore-archived-at` branch and gives that code a token with `issues: write`; a branch rewrite or repository compromise can therefore exfiltrate the token or modify repository labels.

**Triggers:** When the fork branch is force-pushed, compromised, or otherwise modified.

**Suggested fix:** Pin the dependency to an immutable commit or verified release artifact instead of a branch archive URL.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and the workflow now downloads and executes an unpinned archive from a GitHub branch while supplying a repository token, so a faulty or changed dependency could make unintended API calls or modify repository metadata. Reverting stops future runs, but any labels or other repository changes made before the revert may require separate repair.

Blocking findings: .github/workflows/labels.yml:20


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
- name: Sync config with Github
run: uvx labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
run: uvx --with https://github.com/browniebroke/labels/archive/fix/ignore-archived-at.zip labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml

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.

🚨 issue (security): The workflow executes code fetched from the mutable fix/ignore-archived-at branch and gives that code a token with issues: write; a branch rewrite or repository compromise can therefore exfiltrate the token or modify repository labels.

Triggers: When the fork branch is force-pushed, compromised, or otherwise modified.

Suggested fix: Pin the dependency to an immutable commit or verified release artifact instead of a branch archive URL.

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.92%. Comparing base (b308675) to head (8544449).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1774   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          37       37           
  Lines        1333     1333           
  Branches       71       71           
=======================================
  Hits         1332     1332           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@browniebroke
browniebroke merged commit a988e50 into main Sep 24, 2026
20 checks passed
@browniebroke
browniebroke deleted the all-repos_autofix_chore/labels-fork branch September 24, 2026 11:27

This branch was successfully deployed

1 active deployment
release — 8544449d Deployed Sep 24, 2026 by browniebroke via release #3911
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