feat(commits): open the selected commit on GitHub#330
Open
jongio wants to merge 1 commit into
Open
Conversation
Add an `o` keybinding to the commits panel that opens the selected commit's github.com page in the default browser. The commits panel could copy a commit hash but had no way to jump straight to the commit on GitHub, so reviewers had to build the URL by hand. The handler resolves the origin remote, converts it to an https github.com base with the existing RemoteToHTTPS helper, and appends `/commit/<hash>`. It is a no-op when nothing is selected and shows a clear toast when the repo has no github remote. The keybindings manifest already documented `o` for this panel; this wires it up and regenerates docs/keybindings.md. Closes #328 Co-authored-by: Copilot App <[email protected]>
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.
Adds an
okeybinding to the commits panel that opens the selected commit on GitHub in the default browser.The panel could copy a commit hash but had no way to open the commit page directly. Pressing
onow resolves the origin remote, buildshttps://github.com/<owner>/<repo>/commit/<hash>, and opens it. It is a no-op when nothing is selected and shows a toast when the repo has no github remote.Changes
openCommitOnGitHub()handler plus a purecommitURLbuilder ininternal/panels/commits/github.gookey into the dispatch switch andKeyBindings()o) and regenerateddocs/keybindings.mdVerification
go build ./...cleango test ./internal/panels/commits/ ./internal/keybindings/passCloses #328