What could cause the
merge_commit_sha on a PR to change during an action run?
I am seeing it change sometimes during a run even when the base branch and head of the base branch isn’t changing. The head of the PR branch isn’t changing either. I’m only expecting it to change if GitHub needs to make a new test merge commit, and I thought it would only need to do that if the base branch changed or the head commit on the PR branch changed?
Is this a bug?
E.g. on this action run the
merge_commit_sha in the action context was
cd2db2bd06d39c54f78109d138abb8d68ad175d4, but later the one that comes back from the API was
c59639de0faffb38973b54cab24520567b5bcff5. Both commits actually exist and look identical. The PR should be up to date with the base branch because the ‘update branch’ button is not showing.
Rerunning the job when it fails like this usually fixes it.