-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
We’re currently using pre-commit for local and CI linting/formatting hooks.
Updates to these hooks are handled automatically through pre-commit.ci, configured with:
ci:
autoupdate_schedule: quarterlyThis means that every few months, pre-commit.ci will open an automated pull request (e.g. “[pre-commit.ci] pre-commit autoupdate”) with updated hook versions.
Motivation
These auto-update PRs require a manual approval and merge each time — even though:
- They are generated by a trusted bot (pre-commit-ci[bot])
- All CI and formatting checks must already pass before merge
This adds unnecessary overhead for a purely maintenance task.
Proposed Solution
Enable automatic merging of pre-commit.ci’s autoupdate PRs once all required checks have passed.
We’ve investigated this and found that:
- Pre-commit.ci does not provide a built-in auto-merge option (confirmed in issue #48)
- GitHub’s built-in auto-merge feature is limited, as it cannot be restricted to specific actors such as bots (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)
- We can use Mergify to handle automatic merging.
- It has already been installed as a GitHub App and connected to the vortex-ci repository.
Tasks
- Research whether auto-merging pre-commit.ci autoupdate PRs is possible using Mergify.
- Set up a test repository to experiment with a .mergify.yml configuration (this should be done a personal repo and you must install Mergify as a GitHub App)
- Verify that auto-merge triggers only for PRs created by
pre-commit-ci[bot]. - Ensure all required CI checks pass before any auto-merge is performed (add an example GitHub actions workflow to test on)
- Document the setup steps and results (e.g., limitations, required permissions, etc.).
- If successful, propose integrating the solution into the vortex-ci repository and other repositories that use pre-commit autoupdate
References:
- pre-commit.ci documentation — Continuous integration service for pre-commit hooks
- pre-commit documentation — General usage, configuration, and hook management
- Mergify documentation — YAML-based automation and merge queue configuration
- Mergify App on GitHub Marketplace — Installation and permissions
- pre-commit-ci/issues#48 — Discussion confirming that auto-merge is not built into pre-commit.ci
Contacts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels