Code
Other mentions
Update your Git Clone step to 4.0.5 (or higher) as we had it totally rewritten to make it more concise, stable and reliable. Plus it'll be easier to contribute to it in case a new feature is needed. ✨
In case of a Pull Request on GitHub, we cloned the pull request merge branch provided by GitHub (pull//merge), but we had multiple reports of Bitrise using an older state of code without the updates when a build was triggered. This was caused by GitHub's practice of not updating this special branch with every new incoming code update.
Originally we used the github provided pull/X/merge directly, which includes the pre-merged code directly, but due to recent changes on how/when github updates that branch we had to change that. In short, in the past if you pushed a code change to an open PR the /merge branch was auto updated by github, every time. A couple of months ago github changed this and it’ll now only update the /merge branch if you actually visit the page on the web UI. This means that there’s no point in testing /merge as it might be outdated.
Code
popuko/operation/branch.go
Lines 19 to 22 in 7d867d3
refs/pull/XXX/mergeOther mentions
https://blog.bitrise.io/git-clone-step-revision
https://discuss.bitrise.io/t/git-clone-step-merge-happens-when-manual-merge-is-no/4436