Skip to content

Comments

Merge immediately if branch is up to date and passes tests#397

Merged
dknopik merged 2 commits intosigp:stablefrom
dknopik:mergify-faster
Jun 27, 2025
Merged

Merge immediately if branch is up to date and passes tests#397
dknopik merged 2 commits intosigp:stablefrom
dknopik:mergify-faster

Conversation

@dknopik
Copy link
Member

@dknopik dknopik commented Jun 27, 2025

Issue Addressed

Mergify, in it's current config, adds PRs to the merge queue even if it is tested and up to date with the current branch. That is unfortunate because it adds additional waiting time for us.

Proposed Changes

Only add a PR to the merge queue if it is behind the target branch.

Otherwise, wait until tests have passed, and then merge directly.

Additional Info

CC @diegomrsantos

@dknopik dknopik added ready-for-review This PR is ready to be reviewed devops Devops tasks labels Jun 27, 2025
@diegomrsantos diegomrsantos requested a review from Copilot June 27, 2025 13:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Mergify configuration to only queue PRs that are behind the target branch and to auto-merge up-to-date PRs once tests pass and reviews are approved.

  • Restricts existing queue rule (#commits-behind > 0) so it only enqueues outdated PRs
  • Adds a new rule to directly merge up-to-date PRs (#commits-behind == 0) after successful tests and at least one approval
Comments suppressed due to low confidence (2)

.github/mergify.yml:85

  • [nitpick] The rule name is very long and may be hard to scan; consider shortening it to something like Queue outdated ready-for-merge PRs for clarity.
  - name: Add ready-to-merge labeled PRs that are not up to date with target to merge queue

.github/mergify.yml:95

  • [nitpick] These two rules share several identical conditions (e.g. base!=stable, label=ready-for-merge, label!=do-not-merge); consider extracting common conditions or using a reusable snippet/template to reduce duplication.
  - name: Directly merge ready-to-merge labeled PRs that are up to date with target

type: APPROVE

- name: Add ready-to-merge labeled PRs to merge queue
- name: Add ready-to-merge labeled PRs that are not up to date with target to merge queue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on the copilot comment, does this name appear somewhere? If so, maybe we can use only "Add to merge queue" and add the rest as a comment. Otherwise, looks good to me. There's some duplication, but not a big deal imo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on the copilot comment, does this name appear somewhere?

I think it appears in small letters in the Github actions window below the PR.

I made the names shorter 👍

@dknopik dknopik changed the base branch from unstable to stable June 27, 2025 14:00
Copy link
Member

@diegomrsantos diegomrsantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this

@dknopik
Copy link
Member Author

dknopik commented Jun 27, 2025

Need to point this to stable as mergify wants the config to be in the default branch 🫠

Thanks for addressing this

Np, hopefully it makes it a bit more convenient to use :)

@dknopik dknopik added ready-for-merge and removed ready-for-review This PR is ready to be reviewed labels Jun 27, 2025
@mergify
Copy link

mergify bot commented Jun 27, 2025

Some required checks have failed. Could you please take a look @dknopik? 🙏

@dknopik dknopik merged commit c4a470d into sigp:stable Jun 27, 2025
13 of 15 checks passed
@dknopik dknopik deleted the mergify-faster branch July 18, 2025 09:17
diegomrsantos pushed a commit to diegomrsantos/anchor that referenced this pull request Sep 17, 2025
jking-aus pushed a commit to jking-aus/anchor that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants