ci: automate pre-commit autofix application for renovate bot PRs#276
Merged
Conversation
**Added:** - Implemented logic to capture and upload pre-commit autofix patches when pre-commit fails and makes changes - Added new job to automatically apply and commit autofixes to PRs from the Renovate bot, using GitHub App authentication **Changed:** - Updated checkout step to use PR head ref and disable credential persistence in pre-commit workflow for more secure and accurate checkouts - Documented in CODEOWNERS why workflow and CI config changes require maintainer review, clarifying the security rationale behind the existing rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
autocommitjob to automatically apply pre-commit autofixes to Renovate bot PRspre-commitjob to capture and upload autofix patches when pre-commit fails and fixes are availableAdded:
autocommitjob inpre-commit.yamlthat detects when a Renovate bot PR fails pre-commit checks, downloads the autofix patch, and pushes the fixes back to the PR using a GitHub App tokenChanged:
pre-commitjob to output ahas-fixesflag and capture autofix patches when available