paulirish / git-open

Type `git open` to open the GitHub page or website for a repository in your browser.
MIT License
3.31k stars 247 forks source link

git open commit #125

Open monkindey opened 6 years ago

monkindey commented 6 years ago

How about git open --commit xxxx?

ffes commented 6 years ago

Good idea!

But somebody has to do it :wink:

derimagia commented 6 years ago

It should be able to auto-detect (see if the commit exists) maybe? Instead of having a flag for it

iliaskarim commented 6 years ago

Feature request: git open opens the latest pull request opened for the current branch.

paulirish commented 6 years ago

@ILI4S it was attempted here https://github.com/paulirish/git-open/pull/53 but currently resolving the pull request URL is nontrivial, so we prefer one of two options:

  1. load the branch page (which has a link to the PR in the ui): image

  2. use issue branch naming and use the --issue flag, as documented in the readme.

mlncn commented 5 years ago

Pull request #144 added this option:

    -c, --commit          open current commit

As documented it is only for the current commit; trying to open a commit with an explicit value results in an error:

git-open --commit=8bb53b52560ea
error: option `commit' takes no value

And git-open -c 8bb53b52560ea results in a nonsense URL like https://8bb53b52560ea/8bb53b52560ea/commit/56ddf13245a99490b5c079cdc4ab66b77809dae4

We may have to change the way the current commit works, or even with the flag do what derimagia said and check values so that existing commits aren't misinterpreted.

wingleung commented 4 years ago

PR #155 allows me to pass a specific commit hash

skypesky commented 1 year ago

Does anyone still need this feature?

skypesky commented 1 year ago

done in #https://github.com/skypesky/to-where-cli/pull/45

npm cli: npmjs.com/package/to-where-cli