freeCodeCamp / classroom

BSD 3-Clause "New" or "Revised" License
144 stars 121 forks source link

Enable GitHub's Merge Queue for freeCodeCamp classroom GitHub repository #403

Closed lloydchang closed 1 year ago

lloydchang commented 1 year ago

Enable GitHub's Merge Queue for freeCodeCamp classroom GitHub repository

Originated from https://codedayorg.slack.com/archives/C05ENB1VAKT/p1690507400216779?thread_ts=1690477315.733269

@theGaryLarson wrote to @ngillux

I did it for issue 328 I believe. But things started to break there because of asynchronous changes in pending PRs.

@lloydchang wrote to @GuillermoFloresV

👋 @GuillermoFloresV

While on mobile, can you enable GitHub's Merge Queue?

If not, it can wait until you can access a laptop.

Only maintainers like you and @utsab can enable GitHub's Merge Queue.

GitHub's Merge Queue is designed to address the acute condition summarized by @theGaryLarson, "things started to break there because of asynchronous changes in pending PRs."

About merge queues

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.

A merge queue may use GitHub Actions or your own CI provider to run required checks on pull requests in a merge queue. For more information, see "GitHub Actions documentation."

For more information on merging a pull request using a merge queue, see "Merging a pull request with a merge queue."

Who can use this feature People with admin permissions can manage merge queues for pull requests targeting selected branches of a repository.

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue


Relates to https://github.com/freeCodeCamp/classroom/issues/328 https://github.com/freeCodeCamp/classroom/pull/400 https://github.com/freeCodeCamp/classroom/pull/401 https://github.com/freeCodeCamp/classroom/issues/402 https://github.com/freeCodeCamp/classroom/pull/366#issuecomment-1652616915


Relates to https://github.com/freeCodeCamp/classroom/pull/401#issuecomment-1656149999

@ngillux Did the response structure change in a different pull request https://github.com/freeCodeCamp/classroom/pull/366 from @theGaryLarson's https://github.com/freeCodeCamp/classroom/pull/353?

If yes, I believe the fundamental issue is what @theGaryLarson summarized yesterday, "things started to break there because of asynchronous changes in pending PRs."

Meanwhile, I submitted an issue request https://github.com/freeCodeCamp/classroom/issues/403 for @GuillermoFloresV to Enable GitHub's Merge Queue for freeCodeCamp classroom GitHub repository to address the fundamental issue of asynchronous changes in pending PRs.

Thank you!

lloydchang commented 1 year ago

Relates to https://github.com/freeCodeCamp/classroom/issues/415

Please enable

  1. "Require status checks to pass before merging"
  2. "Require branches to be up to date before merging"

via GitHub Protected Branches

GitHub Protected Branches is in a similar space as Merge Queue but is a different feature.