Workflow's pull_request 'branches' not working properly #118623
Replies: 1 comment 1 reply
-
So, I found the cause of this but I can't explain why it's happening, it seems like a bug in GitHub. If I have two different pull requests, targeting two different branches, but have the same source branch, the failed checks from one pull request will show up in the second pull request as well. So I have one pull request where the checks never even ran, but the checks are still showing up there, and when I open the details for that workflow run, it was triggered by a completely different pull request. So to simplify, I have pull request A and pull request B. PR A gets created first, all of its checks pass (or are skipped). PR B gets created some time later, while PR A is still open. PR B's checks fail, and now those failed checks show up also on PR A. It's not PR B or any code or changes there causing checks to run again for PR A. It's just that PR B's checks are showing up in PR A. It's like one pull request is corrupting the checks in another. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I have a workflow that is running when it shouldn't. According to the documentation I've read it doesn't make sense as to how it's possible.
I have a pull request targeting a branch named
main
, which is not listed as one of the branches for my workflow.Here's the relevant portion of the workflow:
In the image below you can see the pull request, which is targeting
main
, a branch that's not listed in the workflow.In this next image you can see that the workflow ran anyway during the
pull_request
event, but it skipped the same workflow during thepull_request_review
event. The head branch, however, does match the name of a branch where the workflow would run. But according to GitHub's documentation, the branches listed for apull_request
event correspond with the base branch (target branch), and not the head branch (source branch). Also, as you can see in the workflow snippet above, I have a conditional where it checks the base branch name, and it still passed that condition somehow as well during thepull_request
event, but not during thepull_request_review
event, where it shows that the check was skipped.For the condition to pass during
pull_request
but fail duringpull_request_review
, that suggests that the base branch name was different in each case. If that's the case it would explain why thebranches
I listed underpull_request
failed to work. But this behavior seems like a bug in GitHub's actions, if true.Beta Was this translation helpful? Give feedback.
All reactions