Github onebox does not point to individual commits in PR links

https://github.com/discourse/discourse/pull/4662/commits/706b4f6b9faf1f820a294e83f82b0b5a5dba0475

https://github.com/discourse/discourse/pull/4662/commits/706b4f6b9faf1f820a294e83f82b0b5a5dba0475

https://github.com/discourse/discourse/pull/4662

https://github.com/discourse/discourse/pull/4662

Both links generate the same onebox even though the first link is pointing to a particular commit in the PR.

2 Likes

It’s because it’s a pull request onebox, not a commit onebox :slight_smile:

I wouldn’t say it’s a bug so much as “we never implemented a different view for the PR onebox if a specific commit is linked to.” I’m not 100% sure what it should show here – the same title but a subtitle with the commit?

2 Likes

I think it should just use the commit onebox which represents the link better.

Sure, good suggestion. The latest onebox handles this as a commit onebox:

https://github.com/discourse/discourse/commit/94ab194a7f420558229f0fb26e790188b629b942

7 Likes