Skip to content

ci: auto-commit pre-commit changes on dependabot PRs#577

Merged
probberechts merged 2 commits into
PySport:masterfrom
probberechts:fix/dependabot-precommit-autofix
Jul 23, 2026
Merged

ci: auto-commit pre-commit changes on dependabot PRs#577
probberechts merged 2 commits into
PySport:masterfrom
probberechts:fix/dependabot-precommit-autofix

Conversation

@probberechts

Copy link
Copy Markdown
Contributor

When Dependabot updates dependencies in our pyproject.toml and uv.lock, it does not re-export the associated requirements-dev.txt and requirements-docs.txt files. Consequently, when the CI workflow runs, the uv-export pre-commit hook exits with a failure code, and causes the entire CI pipeline to fail, requiring manual intervention to commit the exported files on every Dependabot PR.

This PR updates .github/workflows/test.yml to automatically intercept and commit these changes on Dependabot PRs:

  • Grants the pre-commit job contents: write permissions.
  • Utilizes stefanzweifel/git-auto-commit-action to automatically commit and push the updated requirements-*.txt
    files back to the PR branch whenever Dependabot is the actor and the pre-commit check fails.
  • Normal workflows triggered by actual users remain unchanged; if they fail the pre-commit check, the CI will still halt as expected to ensure the developer reviews the diff.

@probberechts
probberechts merged commit 64f675b into PySport:master Jul 23, 2026
19 of 20 checks passed
@probberechts
probberechts deleted the fix/dependabot-precommit-autofix branch July 23, 2026 13:20
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