add: View Branch on GitHub Context Menu Item#21251
Merged
niik merged 6 commits intodesktop:developmentfrom Nov 28, 2025
Merged
Conversation
Introduces a new context menu item allowing users to view the current branch on GitHub if an upstream remote is set. Implements the handler in BranchDropdown and updates the context menu item generation logic.
Renamed onViewBranchOnGithub to onViewBranchOnGitHub for consistency and to fix a typo in the branch dropdown component.
Simplified variable usage in onViewBranchOnGitHub by directly accessing props and removing redundant assignments.
niik
requested changes
Nov 27, 2025
Member
niik
left a comment
There was a problem hiding this comment.
Thanks @DylanDevelops! Left two suggestions but happy to bring this in once that's resolved
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Removed redundant assignment of the 'url' variable in the BranchDropdown component to ensure only the correct URL is used when opening a branch in the browser.
Contributor
Author
|
@niik I implemented your suggested changes and fixed up the small formatting issues. When I tested, everything seemed to work great! Let me know if this looks good or if there is anything else I should do. |
niik
approved these changes
Nov 28, 2025
Member
niik
left a comment
There was a problem hiding this comment.
Love it, thanks a bunch @DylanDevelops
Contributor
Author
|
Thank you, @niik! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21071
Description
I added the ability to open the branch on GitHub if it exists on the remote. I accomplished this by crafting a URL with parameters retrieved from the repository. This was the solution I came up with to craft this URL; however, if you know of a better way, let me know!
Additionally, I conditionally render the context menu based on whether the remote name variable exists. I'm not sure if this is the best way to do this, either, but it seems to work. Please let me know if there is an easier variable I can check.
Screenshots
Main Branch:

Branch w/ Pull Request:

Local Branch:

Release notes
Notes: [add] "View Branch on GitHub" option on branch list context menu