-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display actual commit hash #83
Conversation
@pietroalbini I think it's useful when test-on-fork is enabled, it'd be great if you could review it when you have time. |
This shouldn't be needed, most of the times GitHub fills the link anyway. |
Oh, really? I saw bors displayed the sha on fork repo directly and it didn't be linked properly like this: rust-lang/rust#70072 (comment) |
Not really: test-on-fork relies on an implementation detail of GitHub, as behind the scenes it stores all the forks in the same repo. So, when bors pushes a commit to the fork, the commit is also available on the main repo, so GitHub is able to generate a link to it. My guess is that there is some eventual consistency in GitHub, and occasionally GitHub doesn't recognized the commit is there as soon as the comment is posted. |
triage: Status? |
This is not actually needed, once GitHub figures the commit was pushed it will show the correct link. |
Really? IME the commit hash doesn’t get linked because it’s on rust-lang-ci/rust. Unless I’m thinking of something else... |
Hmm, it looks like it autolinks to the merge commit only once it has been pushed to rust-lang/rust. It doesn’t seem to link to the commit on rust-lang-ci. |
@camelid it's... weird. Basically, GitHub internally stores all the forks in the same git directory as the main repository, to save storage space. This implementation detail leaks all over the UI though: for example, if you visit GitHub takes a couple of seconds to realize a commit pushed in a fork is also present in the main repository though, so if you try to read the "build in progress" comment as soon as it's posted you won't see the link. Once a couple of seconds have passed and the caches on GitHub's side expire, you'll see the linked commit. |
That is weird :)
Yeah, I've always wondered how that works! Although it is helpful in PRs to be able to easily refer to a particular commit, so it's probably not entirely intended to be an implementation detail ;) |
It's useful to display fork commit hash when test-on-fork is enabled.
r? @pietroalbini