Fix: Update merge-group behaviour to support additional merge queue configurations #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
When working with merge queues, one of the configuration options is 'Only merge non-failing pull requests'. As described in the docs, "This setting determines how a merge queue forms groups of pull requests to be merged."
Setting this configuration to true means every pull request must pass status checks in order to be merged as part of the group.
Setting this configuration to false means that so long as the final pull request in the group passes it's status checks then the whole group will be merged.
Problem
Issue: #191
Initial change: #145
Initial comment: #140 (comment)
The previous change linked above requires 'Only merge non-failing pull requests' to be true. This is fine as failing pull requests will be removed, it can safely assume that the previous commit will be successful.
In cases where 'Only merge non-failing pull requests' is false, it would be preferable for the merge group to use the default previous successful commit behaviour. This would allow the final pull request in a merge group to run the applicable checks for any changes in the group.
Solution Proposed
Adding an additional configuration option to make the current merge-group behaviour optional.