adRise / update-pr-branch

Github Action to automatically update PR branches that match the criteria. Designed to work with the Github `auto-merge` feature.
MIT License
18 stars 10 forks source link

Add input parameter for sort order of PRs #6

Closed greglockwood closed 2 years ago

greglockwood commented 3 years ago

We should add the ability to specify an input parameter or two for the task that nominates the sort order to load the PRs in.

This is necessary for us when open-sourcing the task/publishing it to the GH Marketplace, since how to order the PRs when considering the first auto-update candidate is important and will differ from team to team.

Even within our team, there was some debate over how to order the PRs (e.g. newest or oldest first?). So being able to tweak this via the workflow YAML file will make it easy to experiment with different possibilities to find the one we like best.

The wider issue

All logic for what constitutes a valid auto-update candidate should be able to be customized via optional inputs. We should default them to sensible values that work for the majority of use cases (so change the default approvals required to 1, not 2) but allow users to customize as required.

zhiyelee commented 3 years ago

We should add the ability to specify an input parameter or two for the task that nominates the sort order to load the PRs in

We can consider adding this input where there is a real need for this, either from our team or another team.

zhiyelee commented 2 years ago

Done with https://github.com/adRise/update-pr-branch/pull/14