Repository navigation
feat(ui): copy a commit's id and web page from the commit menu - #21
Merged
Merged
Conversation
…ommit menu The web page covers github.com and gitlab.com, the hosts known by name (#15).
…ove the menu's links A ".git/" suffix, a wiki remote, or a query or extra path in the origin URL no longer yields a broken page; the e2e test now opens the page in a new tab.
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 #15.
The commit menu, on a row or a graph node, now copies the full commit id. When the origin is on github.com or gitlab.com, it also copies the commit's web page URL and opens that page in a new tab. Other origins show only the id item.
Which hosts get a web page
commit_url_baseknows github.com (/commit/<id>) and gitlab.com (/-/commit/<id>, with nested groups) by name. A self-hosted GitLab or GitHub Enterprise cannot be told from other hosts by its name alone, so it gets no web page; the forge section of the roadmap now lists the setting that would cover it.Only
remote.origin.urlis read, as for the existing GitHub permalinks. A URL with credentials,http://, a port, or aninsteadOfalias gets no web page.Stricter URL parsing, shared with the GitHub permalinks
repo_path_onnow strips a trailing slash before.git, and accepts only plain path segments. It rejects wiki remotes.github_web_urlgoes through it too, so an origin such ashttps://github.com/o/r.git/now yields a working permalink base instead of one ending in.git.