Commit graph

87 commits

Author SHA1 Message Date
Mislav Marohnić
a8c37a1f5c Fix hostname being respected in web browse commands 2020-07-02 20:54:07 +02:00
Mislav Marohnić
e4448c73e4 Respect original hostname in formatRemoteURL() 2020-06-23 20:06:50 +02:00
Mislav Marohnić
0dfc0f733f Fix indentation of Example blocks
In HTML, `Example` blocks seem to be already injected in fenced Markdown
blocks `` ``` ``, so they don't need to be especially intented.
2020-06-11 20:31:37 +02:00
Mislav Marohnić
e6a0c3dc28 Fix EXAMPLES sections of various commands
- Code should be intented per Markdown syntax for a code block. This
  matters when this documentation is rendered to HTML

- Fix some innaccurate usage examples

- Tweak wording, formatting in a few places
2020-06-11 18:47:57 +02:00
Corey Johnson
56f1315d5f Merge remote-tracking branch 'origin/trunk' into h-e-l-p 2020-06-10 09:28:40 -07:00
Corey Johnson
30d1257096 Update help output 2020-06-09 13:19:00 -07:00
Corey Johnson
8979c0ce41 Update repo 2020-06-09 09:51:18 -07:00
Corey Johnson
0af61bee90 Set core root commands 2020-06-09 08:49:22 -07:00
Nate Smith
28f91cbed8
Merge pull request #1107 from vilmibm/move-credits
minor credits polish
2020-06-08 15:17:52 -05:00
vilmibm
89830d86d1 correct usage 2020-06-08 12:32:51 -05:00
vilmibm
e2ef712e43 use Command.Hidden 2020-06-08 12:31:40 -05:00
Mislav Marohnić
d59ebfd6e8 repo clone: clarify defaulting to current username 2020-06-05 13:00:40 +02:00
vilmibm
804ebf0d4d linter appeasement 2020-06-04 17:07:16 -05:00
vilmibm
bd4bac962a use Annotations to hide commands 2020-06-04 16:42:32 -05:00
vilmibm
c09c2ad025 shuffle around credits command so it makes more sense 2020-06-04 16:38:03 -05:00
Joe Hattori
47e71b12fa add documentation of this feature 2020-06-04 20:54:24 +09:00
Joe Hattori
e89ddd745d write test
Signed-off-by: Joe Hattori <joe2ninja21@gmail.com>
2020-06-03 22:55:41 +09:00
Joe Hattori
035664a0a7 shorthand of clone without username
Signed-off-by: Joe Hattori <joe2ninja21@gmail.com>
2020-06-03 22:55:41 +09:00
Mislav Marohnić
4d11732a47
Merge pull request #943 from cli/reauth-bug
pass apiClient to determineBaseRepo
2020-05-18 13:16:07 +02:00
Kevin Bluer
d440a95aed
Improved error message when "owner/repo" format not provided (#919)
Fixes #882
2020-05-18 11:13:48 +02:00
vilmibm
c8c807b954 pass apiClient to determineBaseRepo
Our code had an unspoken assumption that only one apiClient is created
during the course of a command. Violating this assumption is fine in
almost all cases, but not when we need to do a re-auth to add a new
oauth scope to a user's token.

There is likely a more elegant solution to the problem but until then
this changes determineBaseRepo to use an existing apiClient.
2020-05-15 15:29:33 -05:00
Victor Hugo
8f67ad44e0 add description default private for repo create 2020-05-08 15:04:02 -04:00
vilmibm
15a6225f05 totally inelegant approach to hopefully stopping flakey tests 2020-04-29 14:17:16 -05:00
vilmibm
03e60758d0 missed a thing 2020-04-22 16:08:47 -05:00
vilmibm
f1bee0c9b9 use more clear name 2020-04-22 15:49:16 -05:00
vilmibm
bec58ede98 respect ssh
this adds recognition of the git_protocol setting when:

- creating a repo
- cloning a repo
- forking a repo
- forking/pushing during pr create
- checking out a PR

additionally, it:

- consolidates remote adding to use AddRemote; this introduces a fetch
where there previously hadn't been one
- changes repo clone to accept an ssh url
- changes repo fork to accept an ssh url

i just added basic unit tests; adding new test cases for all of the
above scenarios seemed like diminishing returns.
2020-04-22 14:21:01 -05:00
Mislav Marohnić
d14b5d3e2c
Merge pull request #764 from cli/pr-view-docs
Improve `issue/pr/repo view` documentation
2020-04-09 19:12:34 +02:00
Mislav Marohnić
d1754b2bb0 Improve issue/pr/repo view documentation
- Short-form docs for `pr/repo view` no longer say "in browser"

- Long-form docs for all these commands now list more information about
  what will be displayed in the terminal, plus stressing out the
  alternate behavior with the `--web` flag.

- `--web` flag docs: add English articles
2020-04-08 12:04:39 +02:00
Tiernan L
1aba837589
update text to long-form
Change from "repo" to "repository".  Run "gh repo clone -h` to see the usage text I am referring to.

We use the word "repository" here:

Usage:
  gh repo fork [<repository>] [flags]

Usage:
  gh repo view [<repository>] [flags]
2020-04-06 11:27:17 -10:00
Mislav Marohnić
e878cdf060
Merge pull request #752 from lumaxis/feature/fetch-upstream-after-adding
Fetch upstream remote after adding it

Fixes #731
2020-04-06 19:48:14 +02:00
Lukas Spieß
7e1ed5f9a3
Fetch upstream remote after adding it 2020-04-05 20:54:29 +02:00
Fotios Lindiakos
6428e3da10
Rename parseExtraArgs 2020-04-03 10:10:46 -04:00
Fotios Lindiakos
199021d55d
Cleanup clone description 2020-04-03 10:10:32 -04:00
Fotios Lindiakos
59f239bddc
Parse args to find an explicit directory name 2020-04-01 16:43:27 -04:00
Fotios Lindiakos
ed62b7bbd5
Consolidate 'git clone' commands 2020-04-01 15:05:18 -04:00
Mislav Marohnić
fa3d65b2b6 Add "upstream" remote after repo fork 2020-03-31 18:36:41 +02:00
Mislav Marohnić
8460609181 repo clone: automatically set up "upstream" remote for forks 2020-03-31 15:32:52 +02:00
vilmibm
44acdd4ec3 Merge branch 'master' into pr-status-no-commits 2020-03-30 12:04:02 -05:00
Mislav Marohnić
da2116f8ee Merge remote-tracking branch 'origin/master' into pr-create-push-default 2020-03-30 13:32:37 +02:00
Mislav Marohnić
265db26b78 Merge remote-tracking branch 'origin/master' into detect-existing-fork 2020-03-30 12:02:33 +02:00
Mislav Marohnić
965f2704f3 repo fork: reuse existing git remote
Avoid adding a new git remote for a fork if an existing remote is found
that points to the exact forked repo.
2020-03-27 13:30:25 +01:00
Mislav Marohnić
0f98d56649 Rename underscored variable to camelcase 2020-03-27 13:30:25 +01:00
Mislav Marohnić
a6335396cf repo fork: simplify printing the name of an existing forked repo 2020-03-27 13:30:25 +01:00
vilmibm
f4b8851011 Merge remote-tracking branch 'origin/master' into pr-status-no-commits 2020-03-25 12:00:58 -05:00
Nate Smith
26022bc684
Merge pull request #690 from cli/repo-view-terminal
Add ability to view repo in terminal and do it by default
2020-03-25 11:32:26 -05:00
vilmibm
a8a57595dc explicitly ignore readme fetching error 2020-03-25 11:26:58 -05:00
Mislav Marohnić
5b2e1847b7 Merge remote-tracking branch 'origin/master' into pr-create-push-default 2020-03-25 08:16:04 +01:00
vilmibm
379ecdab54 move readme fetching to api package 2020-03-24 15:21:18 -05:00
vilmibm
5187ad4431 move preparecmd and Runnable to its own package 2020-03-23 16:32:29 -05:00
vilmibm
3459dfab95 add viewing repo in terminal 2020-03-20 16:26:49 -05:00