Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only combine PRs if more than one exists #13

Merged
merged 8 commits into from
Mar 28, 2023
Merged

Conversation

gedwards1
Copy link
Contributor

@gedwards1 gedwards1 commented Mar 27, 2023

This PR changes the combine-prs logic to only open a combine pull requests if more than one matches the provided criteria.

Why
I believe the intention of this Action is to provide a more efficient way to manage multiple PRs at once. When there's only one PR open, opening a 'combined' pull request with only that PR doesn't improve efficiency, as it's effectively just a duplicate of the existing PR.

Considerations
Should we add a new flag that allows the user to control "combine" a single PR?

  • The only use case I could think of is where someone has a workflow that exclusively works uses the PR created by this action rather than the dependabot PRs. This seems so too niche to put in the work for such a flag.
  • If we had flag and defaulted it to the action's existing behavior then this PR would no longer have breaking changes. That's the best reason I can think of to add a flag.

@gedwards1 gedwards1 self-assigned this Mar 27, 2023
@gedwards1 gedwards1 marked this pull request as ready for review March 28, 2023 02:12
@gedwards1
Copy link
Contributor Author

I'd appreciate feedback on my change. This PR contains a breaking change and I don't want to provide a bad experience to the downstream users. Also this is my first time contributing to open source code, so criticism is very welcome!

@GrantBirki
Copy link
Member

@gedwards1 Thank you for this PR! I think this will be rather helpful for folks and remove duplicate work through PRs with only a single PR combined into it.

I really liked your suggestion to having a new "input flag" that gives the user control of the threshold of how many PRs should exist before they can be combined together. I went ahead and pushed this commit which does exactly that -> 633255c

@GrantBirki GrantBirki added the enhancement New feature or request label Mar 28, 2023
@GrantBirki GrantBirki merged commit 52676a9 into main Mar 28, 2023
@GrantBirki GrantBirki deleted the gedwards-patch-1 branch March 28, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants