hrvey / combine-prs-workflow

Combine/group together PRs (for example from Dependabot and similar services)
https://www.hrvey.com/blog/combine-dependabot-prs
MIT License
296 stars 51 forks source link

Closes #17: Added 'mergeable' check to cover cases where PRs don't have checks #18

Open BravoNatalie opened 1 year ago

BravoNatalie commented 1 year ago

The current implementation of the stateQuery fails if the PR does not have any checks associated with it but can be merged. To solve this, the mergeable property was added to the stateQuery and it's evaluated in the case of statusCheckRollup being null.

This PR closes the issue #17 .

martingjaldbaek commented 1 year ago

Hi @BravoNatalie - thanks for the PR!

And sorry this took some time to look at - first off, life happened. But secondly I also wasn't sure if this was strictly an improvement, or if there was a risk of causing problems/confusion, so I've been mulling this over. Here are the issues I've been considering:

1) There is already the option of setting "mustBeGreen" to false, as a way to work with PRs that don't get checks run on them

Overall, if it wasn't for 3) I would have merged this already. But I do worry that having the workflow be able to silently fail for non-obvious reasons is a bit of a foot-gun for users. Any thoughts?