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

Feature request: allow update for PRs with ongoing checks #33

Closed LeZuse closed 3 months ago

LeZuse commented 5 months ago

Hi! Thanks for creating this Action. I have found one edge case in our workflow for which the current configuration options do not allow any tweaking. Basically the require_passed_checks also includes ongoing checks which means that when you actually have a healthy PR waiting for checks to be merged it won't get auto updated. This results in passing green PRs waiting for some other PR to get merged for this Action to trigger. This effectively prolongs the cycle time of PRs.

I was thinking about a couple of options to fix this:

  1. change the behavior of require_passed_checks to only look for NOT FAILED checks (this would be a breaking change) and add another require_finished_passed_checks which would check for NOT FAILED and NOT ONGOING
  2. introduce another allow_ongoing_checks which would also update PRs that have checks in flight (not a breaking change)
  3. introduce a new force_label option which would allow PR authors to override all the require_* options to force update

Which option would be the best here? I could help with the implementation.

zhiyelee commented 5 months ago

@LeZuse Thanks for the issue. I love 2 and 3 in the list, but I feel 3 can't replace 2 because that will require manually adding the force label. Let's do 2 first but I am open to 3 if people want it

zhiyelee commented 3 months ago

@LeZuse allow_ongoing_checks has been added in the latest release. Thanks for the suggestion

LeZuse commented 1 month ago

@zhiyelee awesome, thanks for the change! I will update once I find a little bit of time