rocq-prover / rocq-prover/stdlib

Require status checks to pass before merging (for auto-merge, no policy change)

Open
#148 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rocq Prover
Stars
42
Forks
38
Avg merge
14h 6m
Merged PRs (30d)
3

Description

I would like to use the "Enable auto-merge" feature of GitHub, to mark PRs to be merged as soon as CI passes. I have used it extensively in my own repositories and found it to be reliable, and a good way to reduce friction for contributing. However, this feature is limited to branches with a branch-protection rule preventing merging without a passed check:

The option to enable auto-merge is shown only on pull requests that cannot be merged immediately. For example, when a branch protection rule enforces "Require pull request reviews before merging" or "Require status checks to pass before merging" and these conditions are not yet met. For more information, see Managing a branch protection rule.

Further, branch protection rules must explicitly enumerate checks that pass, which seems impractical given the current fine-grained check granularity. If that granularity is to stay, I believe the actual configuration would have to be as follows:

  1. Add a job that fails unless all other jobs succeed (depending on the other jobs is not good enough because dependency failures cause "skipped", not "failed"). There's a marketplace action called "alls-green" that may be useful for inspiration.
  2. Configure a branch protection rule for master to require CI checks to pass before merging. This way not-yet-passing PRs can be set to merge once CI passes.
  3. Enable the "bypass branch protections" for all roles with the merge permission. This way, non-passing PRs can still be merged.

I would be happy to try hand at configuring this myself if I had the requisite permissions. If this is not desired, I'd be happy to help out.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the repository's branch-protection settings and CI status checks, then compare them with GitHub's auto-merge requirements and the documented alls-green approach. Done means auto-merge can be enabled for not-yet-passing pull requests while the requested branch-protection policy remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.