-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Description
We know that the workflows triggered via pull_request
event uses merge commit as GITHUB_SHA
. Now I would expect that if we change the base branch (using 'edit' button on the pull request in GitHub UI) there would be a new merge commit and that should be used if I trigger the workflow. But with my testing the action/checkout
still uses old merge commit from previous base branch. If I push any further commits everything works as expected and action/checkout
fetches the updated merge commit.
Steps to reproduce
Assuming you have workflow triggered on all pull_request
events:
- Create 3 branches
foo
,bar
,foobar
- Create a PR from
foo
inbar
. - Check the fetched ref in action workflow logs.
- Change the base branch from
bar
tofoobar
- Trigger the action again.
- The fetched ref should be same as step 3.
Workaround
- Push new commits to propagate the merge commit change.
- Specify the job ref in step to make sure it has updated value for example
Comments
I know it might be the limitation of the system but wanted to open the issue so more people are aware of it.
xer0x and edreesjalili
Metadata
Metadata
Assignees
Labels
No labels