-
-
Notifications
You must be signed in to change notification settings - Fork 123
Description
I can't adequately explain it, but currently the only explanation I have for the behavior I just saw is that this line is not filtering runs from other branches:
cancel-workflow-action/src/index.ts
Line 69 in ad6cb1b
branch, |
Specifically this happened in an "all_but_latest" self-cancelling config:
1- workflow run on a PR from a branch starts
2- I merge to master branch (triggers another run)
3- I merge again to master branch (triggers another run)
Run 3 cancelled 1 and 2 even though 1 was on another branch
It looks like the workflow_id is not a parameter that the octokit API call accepts, but branch definitely is
https://docs.github.com/en/[email protected]/rest/reference/actions#list-workflow-runs-for-a-repository--parameters
The current run ids would not match, the head_shas did not match, nothing matched so they didn't get filtered - thus my only guess is that the repo workflow list call was expected to filter on branch but clearly did not, which is unexpected.
🤔