mrpotatoes / git-url

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@mrpotatoes/git-url

"outFile" -> https://stackoverflow.com/questions/34474651/typescript-compile-to-single-file

An easy way to open a git url to either to the pull request, commits, branches, browse pages using one command.

Just goto to any directory git managed directory (a directory with .git somewhere in it's parents) and run git-url.

Options

none        -> open just the browse page
--pr        -> open the pull-requests page
--commits   -> open the commits page
--branches  -> open the branches page
--browse    -> open the browse page

Only opens the main page if no flags are provided.

If you add any in combination you'll open all of them in their own links.

Currently only works in mac. Quick fix for all coming.


The way it works

Only cares about the host and path segments. Anything else should be ignored.

  1. Go-to a git managed directory
  2. Run git-url and flags into command prompt
    1. Strips the -- for each flag.
  3. Load all external plugins from user directory (~/.git-url.external.js)
  4. Get the remote repo git url
  5. Determine which provider (github, bitbucket et al)
  6. Build new base URL
  7. Run the provider function and build paths for any/all flags
  8. Open the URLs

TODO

About

License:MIT License


Languages

Language:TypeScript 93.8%Language:JavaScript 6.2%