Skip to content

chore: prepare repo for multiple branches - #54

Merged
cesarcoatl merged 1 commit into
17from
multibranch
Nov 13, 2026
Merged

cesarcoatl merged 1 commit into
17from
multibranch

Conversation

@cesarcoatl

@cesarcoatl cesarcoatl commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary by Sourcery

Prepare repository automation to support branch-specific testing and releases.

Enhancements:

  • Update CI and publishing workflows to run against the appropriate branch or release tag, enabling reliable multi-branch validation and release builds.

CI:

  • Add pre-commit checks, target CI runs at branch 17, and update shared workflow dependencies.
  • Propagate checkout references through reusable tox workflows and release publishing jobs.

Chores:

  • Remove Dependabot configuration and simplify pre-commit configuration.

@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Pass the intended branch or release tag through the CI, reusable tox, and publish workflows so jobs check out the correct ref.

  • .github/workflows/ci.yml L4 (removed lines), L6-25, L30-31
  • .github/workflows/publish.yml L5, L10-11, L19-20
  • .github/workflows/tox.yml L1 (removed lines), L3-15, L22

Remove the Dependabot configuration and obsolete pre-commit message and skip settings.

  • .github/dependabot.yml (deleted)
  • .pre-commit-config.yaml L1 (removed lines)

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

Choose a reason for hiding this comment

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

Hey - I've found 3 issues

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

## Individual Comments

### Comment 1
<location path=".github/workflows/ci.yml" line_range="7" />
<code_context>
-  pull_request:
   push:
     branches:
-      - main
+      - '17'
+  pull_request:
</code_context>
<issue_to_address>
**Branches receive no CI checks**

When a push or pull request targets a branch other than `17`, `ci.yml` filters both events to `17`, so pushes and pull requests targeting `main` and other branches do not schedule `pre-commit`, `pylint`, or `tox`, leaving those branches without CI validation.

Remove the branch filters from both triggers so the workflow runs for pushes and pull requests to all branches.

Also at `.github/workflows/ci.yml:6`, `.github/workflows/ci.yml:9`.
</issue_to_address>

### Comment 2
<location path=".pre-commit-config.yaml" line_range="1-5" />
<code_context>
-ci:
-  autoupdate_commit_msg: 'build(deps): pre-commit autoupdate'
-  autofix_commit_msg: 'style: apply auto fixes with pre-commit'
-  skip:
-    - pylint
-
 repos:
</code_context>
<issue_to_address>
**pre-commit.ci checks fail**

When pre-commit.ci runs the hooks without a `pylint` executable, the local `language: system` `pylint` hook is no longer skipped, so it invokes an executable the config does not install and the hosted check fails.

Restore `pylint` in the pre-commit.ci skip list or provision the executable for the hook.
</issue_to_address>

### Comment 3
<location path=".github/workflows/publish.yml" line_range="11" />
<code_context>
   tox:
     uses: $/.github/workflows/tox.yml
+    with:
+      checkout-ref: ${{ github.event.release.tag_name }}

   pypi-upload:
</code_context>
<issue_to_address>
**Untested code gets published**

When the release tag is moved after tox checks it out but before the upload job checks it out, the tox job resolves the release tag when it checks out the source, then the upload job resolves that tag again after tox finishes. If the tag is moved between those checkouts, PyPI receives code that tox did not test.

Resolve the release tag to a commit SHA once and use that SHA for both testing and upload.

Also at `.github/workflows/publish.yml:20`.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: .github/workflows/ci.yml:7, .pre-commit-config.yaml:5, .github/workflows/publish.yml:11


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

Comment thread .github/workflows/ci.yml
pull_request:
push:
branches:
- main

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High · Branches receive no CI checks

When a push or pull request targets a branch other than 17, ci.yml filters both events to 17, so pushes and pull requests targeting main and other branches do not schedule pre-commit, pylint, or tox, leaving those branches without CI validation.

Remove the branch filters from both triggers so the workflow runs for pushes and pull requests to all branches.

Also at .github/workflows/ci.yml:6, .github/workflows/ci.yml:9.

Prompt for AI agents
In `.github/workflows/ci.yml` at line 7:

**Branches receive no CI checks**

When a push or pull request targets a branch other than `17`, `ci.yml` filters both events to `17`, so pushes and pull requests targeting `main` and other branches do not schedule `pre-commit`, `pylint`, or `tox`, leaving those branches without CI validation.

Remove the branch filters from both triggers so the workflow runs for pushes and pull requests to all branches.

Also at `.github/workflows/ci.yml:6`, `.github/workflows/ci.yml:9`.

Comment thread .pre-commit-config.yaml
Comment on lines -1 to -5
ci:
autoupdate_commit_msg: 'build(deps): pre-commit autoupdate'
autofix_commit_msg: 'style: apply auto fixes with pre-commit'
skip:
- pylint

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · pre-commit.ci checks fail

When pre-commit.ci runs the hooks without a pylint executable, the local language: system pylint hook is no longer skipped, so it invokes an executable the config does not install and the hosted check fails.

Restore pylint in the pre-commit.ci skip list or provision the executable for the hook.

Prompt for AI agents
In `.pre-commit-config.yaml` at lines 1-5:

**pre-commit.ci checks fail**

When pre-commit.ci runs the hooks without a `pylint` executable, the local `language: system` `pylint` hook is no longer skipped, so it invokes an executable the config does not install and the hosted check fails.

Restore `pylint` in the pre-commit.ci skip list or provision the executable for the hook.

tox:
uses: $/.github/workflows/tox.yml
with:
checkout-ref: ${{ github.event.release.tag_name }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Untested code gets published

When the release tag is moved after tox checks it out but before the upload job checks it out, the tox job resolves the release tag when it checks out the source, then the upload job resolves that tag again after tox finishes. If the tag is moved between those checkouts, PyPI receives code that tox did not test.

Resolve the release tag to a commit SHA once and use that SHA for both testing and upload.

Also at .github/workflows/publish.yml:20.

Prompt for AI agents
In `.github/workflows/publish.yml` at line 11:

**Untested code gets published**

When the release tag is moved after tox checks it out but before the upload job checks it out, the tox job resolves the release tag when it checks out the source, then the upload job resolves that tag again after tox finishes. If the tag is moved between those checkouts, PyPI receives code that tox did not test.

Resolve the release tag to a commit SHA once and use that SHA for both testing and upload.

Also at `.github/workflows/publish.yml:20`.

@cesarcoatl
cesarcoatl merged commit 0c56a57 into 17 Nov 13, 2026
5 checks passed
@cesarcoatl
cesarcoatl deleted the multibranch branch November 13, 2026 20:33
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