Add 'copy branch URL to clipboard' keybinding#5399
Open
Mentigen wants to merge 2 commits intojesseduffield:masterfrom
Open
Add 'copy branch URL to clipboard' keybinding#5399Mentigen wants to merge 2 commits intojesseduffield:masterfrom
Mentigen wants to merge 2 commits intojesseduffield:masterfrom
Conversation
Adds a keybinding (default: 'y') in the branches panel to copy the branch's URL on the hosting service to the clipboard. Each supported hosting service has a dedicated URL template: - GitHub: /tree/<branch> - GitLab: /-/tree/<branch> - Bitbucket: /branch/<branch> - Azure DevOps: ?version=GB<branch> - Bitbucket Server: /browse?at=<branch> - Gitea/Codeberg: /src/branch/<branch> Closes jesseduffield#1959
8468664 to
c2faca1
Compare
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.
PR Description
Adds a keybinding (default:
y) in the branches panel to copy the branch's web URL to the clipboard. This is the URL of the branch page on the hosting service, as opposed to the pull request URL (already available via<c-y>).Closes #1959
Supported hosting services:
/tree/<branch>/-/tree/<branch>/branch/<branch>?version=GB<branch>/browse?at=<branch>/src/branch/<branch>/src/branch/<branch>Branch names with special characters are URL-encoded (same as existing PR URL behaviour).
Please check if the PR fulfills these requirements
go generate ./...)TestGetBranchURLinhosting_service_test.go)CopyBranchURLandBranchURLCopiedToClipboardtoenglish.go)