Skip to content

feat(ci): Create PRs with ruff fixes automatically - #9336

Merged
isaacbmiller merged 8 commits into
mainfrom
isaac/ruff-fail-ci-pr
Feb 26, 2026
Merged

isaacbmiller merged 8 commits into
mainfrom
isaac/ruff-fail-ci-pr

Conversation

@isaacbmiller

@isaacbmiller isaacbmiller commented Feb 26, 2026 •

Copy link
Copy Markdown
Collaborator

Previously, when Ruff found auto-fixable lint issues in a PR, the CI simply failed and told the developer to run pre-commit run --all-files locally.

Now, the CI automatically creates a rolling fix PR targeting the source PR's branch (e.g., ci/ruff-autofix/pr-123 → source branch). If the source PR gets new commits that still have issues, the fix PR is updated in place. The CI step still fails so the check doesn't silently pass.

A companion workflow close_ruff_autofix_pr.yml:1-5 auto-closes the fix PR when the source PR is closed or merged.

Auto-fix PR creation is skipped for forks and non-PR events since the workflow can't push to external repos.

github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
@isaacbmiller isaacbmiller changed the title Isaac/ruff fail ci pr feat(ci): Create PRs with ruff fixes automatically Feb 26, 2026
@isaacbmiller isaacbmiller reopened this Feb 26, 2026
github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
@isaacbmiller isaacbmiller reopened this Feb 26, 2026
github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
Co-authored-by: isaacbmiller <17116851+isaacbmiller@users.noreply.github.com>
@isaacbmiller
isaacbmiller marked this pull request as ready for review February 26, 2026 14:48
@isaacbmiller
isaacbmiller merged commit a8da470 into main Feb 26, 2026
12 checks passed
@isaacbmiller
isaacbmiller deleted the isaac/ruff-fail-ci-pr branch February 26, 2026 18:14
isaacbmiller added a commit that referenced this pull request Feb 27, 2026
MaximeRivest pushed a commit to MaximeRivest/dspy that referenced this pull request Mar 5, 2026
* add auto-ruff fix

* ruff fixable change

* change pr targeting

* remove merge condition

* add a second ruff error

* fix: ruff auto-fix for stanfordnlp#9336 (stanfordnlp#9338)

Co-authored-by: isaacbmiller <17116851+isaacbmiller@users.noreply.github.com>

* Delete dspy/ruff_autofix_smoke.py

* add a concurrency group for prs

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
MaximeRivest pushed a commit to MaximeRivest/dspy that referenced this pull request Mar 5, 2026
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