backstage / backstage

Backstage is an open framework for building developer portals
https://backstage.io/
Apache License 2.0
27.9k stars 5.87k forks source link

🚀 Feature: use GitHub Merge Queue in this repository #25263

Open HonkingGoose opened 3 months ago

HonkingGoose commented 3 months ago

🔖 Feature description

Use GitHub's Merge Queue feature in this repository to speed up your review and merge process.

🎤 Context

This project merges a lot of PRs each day. You can speed up the merge process by using GitHub's Merge Queue. Here's how the GitHub Docs sell the feature:

A merge queue helps increase velocity by automating pull request merges into a busy branch and ensuring the branch is never broken by incompatible changes.

The merge queue provides the same benefits as the Require branches to be up to date before merging branch protection, but does not require a pull request author to update their pull request branch and wait for status checks to finish before trying to merge.

Using a merge queue is particularly useful on branches that have a relatively high number of pull requests merging each day from many different users.

Once a pull request has passed all required branch protection checks, a user with write access to the repository can add the pull request to the queue. The merge queue will ensure the pull request's changes pass all required status checks when applied to the latest version of the target branch and any pull requests already in the queue.

....

The Renovate project uses the Merge Queues to great effect. It makes reviewing and merging so much easier, as the maintainers or pull request authors do not need to keep updating the PR branch so it is current with the main branch.

Here's an example of how it works over on the renovatebot/renovate repository with GitHub Merge Queue enabled:

  1. I open a PR with docs changes.
  2. A maintainer suggests changes.
  3. I apply the suggestions and make other changes.
  4. main branch moves ahead of my PR's branch (Renovate bot updates, other PRs get merged)
  5. Maintainer approves my PR.
  6. Maintainer puts my PR in the Merge Queue and can do something else.
  7. GitHub makes sure my PR works with the latest changes on main and with any other PRs in the Merge Queue.
  8. GitHub merges my PR when the tests all pass.
  9. I delete my PR's branch to clean up my fork.
  10. Done.

The GitHub Blog, How GitHub uses merge queue to ship hundreds of changes every day also shows how Merge Queue can help big projects.

✌️ Possible Implementation

The implementation can be a bit tricky, I can guide you towards the docs, but I can't make the PR with the changes myself unfortunately.

Todos:

Documentation

Read the GitHub Docs, Managing a merge queue to learn:

The Renovate docs, GitHub Merge Queue explains how you can use the Merge Queue with Renovate bot.

👀 Have you spent some time to check if this feature request has been raised before?

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, I don't have time to work on this right now

camilaibs commented 3 months ago

Hi @HonkingGoose, we definitely should experiment with it at some point, thank you for opening the issue 🙌🏻 .

HonkingGoose commented 3 months ago

Thank you for the quick response! ❤️ I definitely recommend trying it. It made things so much easier on the Renovate bot project.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

HonkingGoose commented 1 month ago

Commenting to keep this issue open, as a maintainer said they want to try the GitHub Merge Queue. 😉