AnandChowdhary / dependabot-pr-action

📦 Label, approve, and merge Dependabot pull requests automatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Action gives up once it meets a failed PR

gregtyler opened this issue · comments

We have multiple dependabot PRs on our repo, something like this:

  • #1013, status checks have passed
  • #1014, status checks have failed
  • #1015, status checks have passed

With autoapprove/merge enabled, I would have expected this action to merge both #1013 and #1015. Instead, it has merged #1015 and then failed with the error "All statuses are not success". On subsequent runs, with #1013 and #1014 still unmerged, it continues to give that error.

I think the issue here is in line 80 of index.ts. If it finds an unsuccessful status here it uses break to cancel the entire for loop, so no more PRs are processed. I think it should instead use continue like line 66, where it finds and unsuccessful check.

I'm happy to raise a PR to change this, but wanted to check first because I'm not sure if this difference is intentional.

You're right, it should be continue instead. Happy to accept a PR!

Thanks Anand, I've created #71 :)