Github onebox should show branch name

AI-generated summary

The discussion addresses a feature request to display the branch name in GitHub oneboxes when the link points to a branch other than the default master TheBestPessimist. The user noted that while inline links correctly show the branch, the onebox preview fails to do so, leading to potential confusion about the code context TheBestPessimist. sam confirmed that this functionality was not yet implemented and marked the issue as a “PR welcome,” suggesting that adding the branch name only when a specific non-master branch is linked is a reasonable approach. Subsequently, sam posted an update confirming that the feature now works correctly, demonstrating the branch name (e.g., new-topics-alert) appearing in the onebox preview sam.

When a github link to a “different than master” branch is posted, the onebox should somehow show the branch name.

Here is an exmaple from Proposal: Consolidated Review Queue - #8 by eviltrout :

From this preview i understand that this is on github.com/discourse/discourse and i would expect the branch to be the master branch, which is not correct as the branch is named reviewable: https://github.com/discourse/discourse/tree/reviewable. (Also observe that in the inline link, the branch name is shown correctly).

13 Likes

https://github.com/discourse/discourse/tree/ajax-type

https://github.com/discourse/discourse/tree/ajax-type

This is still not the case … I am putting PR welcome on this, seems fine if the branch is not there by default, only when a specific non master branch is linked.

9 Likes

This works now :hugs:

1 Like