Note that it pulls Pull Request #79 instead of #7 for whatever reason. Consequently, it takes commit from the wrong pull request (36384f8 is a merge commit for 6ad824 for #79, no relation to #7 whatsoever).
This causes wrong status reporting for at least one PRs.
Any ideas on how to fix/work around this issue and make Travis report correct status? What can/should I fix to avoid such issue in the future?
UPD: I’ve tried closing and re-opening the PR to trigger a new job, it happened, but same thing happens: Travis pulls refs/pull/79/merge instead of refs/pull/7/merge.
I looked at various data, and the only explanation I’ve come up with is that 79 was the reference we got when we configured the PR build. Unfortunately, GitHub makes available only 300 events for a repository, and the event we are interested in from 17 days ago is no longer available at this moment.
I’ve tested, and confirmed that closing and re-opening a PR sends new events, so in theory, we should be able to confirm the payload. To do this:
Corresponding GitHub payloads for closing and reopening the PR are available at https://pastebin.com/wnBeXv3m for your inspection. It does not have “119” as a substring, “11” only.
When there are multiple open PRs for a repository where one matches the prefix of another (e.g., 7 & 79, 44 & 443), if a new PR build is triggered on the shorter/older PR, the merge commit from the newest one is checked out instead.
Solution
We’ve fixed the bug. If you saw the problem earlier, please push a new commit to the old PR. This should result in checking out the correct merge commit.