Commit graph

174 commits

Author SHA1 Message Date
Mislav Marohnić
0de3f678bc Only validate --hostname when flag was provided 2020-09-01 13:19:19 +02:00
Mislav Marohnić
b029397d32 Validate the --hostname flag value 2020-09-01 13:06:13 +02:00
Mislav Marohnić
1a051e9c44 Validate hostname as entered in the auth prompt 2020-09-01 12:59:58 +02:00
Nate Smith
fd31007075
Merge pull request #1590 from colinshum/colinshum/template-repo
[Feature] Create repositories from a template repo
2020-08-28 14:09:12 -05:00
Colin Shum
99372f0dbc [Refactor] Add variadic argument to repoCreate to support templates 2020-08-28 15:02:08 -04:00
Sam Coe
41f42d4057 Remove reference to feedback form 2020-08-28 09:06:31 +02:00
Colin Shum
2886dd913f [Refactor] toView -> toClone 2020-08-27 19:13:06 -04:00
Colin Shum
263e3a6a35 Update create_test.go 2020-08-27 17:57:55 -04:00
Colin Shum
32e5d05328 [Fix] Warn user when --template is passed with incompatible flags 2020-08-27 15:00:57 -04:00
Colin Shum
58f62a4a15 [Feature] Create repository from template
Co-authored-by: Mislav Marohnić <mislav@github.com>
2020-08-27 14:46:16 -04:00
Mislav Marohnić
c21caf5b2b Disallow pr -R flag for commands that operate on the current branch
If the `--repo` flag is specified, then the user intends to select a
repository other than the current one. In that case, it doesn't make
sense to fall back to detecting the PR belonging to the current branch,
so throw a descriptive error instead.
2020-08-27 16:30:34 +02:00
Dan Hughes
7b8d052f0e
Add new output to existing test 2020-08-26 17:31:13 +01:00
Dan Hughes
a3aea11e5b
Include URL and number in non-TTY output 2020-08-26 17:28:17 +01:00
Nate Smith
27c49279b3
Merge pull request #1567 from ganboonhong/view-without-username
View repositories without username
2020-08-25 13:57:42 -05:00
Nate Smith
fc1c800042
Merge pull request #1492 from ShubhankarKG/newConfirmations
New confirmations
2020-08-25 13:31:47 -05:00
Nate Smith
82c6830849
Merge pull request #1548 from cli/auth-check
new auth flow UX
2020-08-25 10:16:23 -05:00
vilmibm
451ece198b missed a disable auth check 2020-08-25 10:10:16 -05:00
boonhong
931fee566e shorthand of view without username 2020-08-23 23:33:50 +08:00
ShubhankarKG
7955c4f2ed doSetup wasn't getting called in cases where required.
The problem was that opts.confirmSubmit was mutated before reaching doSetup. This commit creates a copy of the initial confirmSubmit value. So the doSetup receives the initial data passed from the command, not the mutated one.
2020-08-20 14:20:55 +05:30
ShubhankarKG
00b2777a14 Change visibility strings to Sentence case 2020-08-20 14:10:18 +05:30
Nate Smith
b9292f582f
Merge pull request #1476 from rimazk123/prclose-delete
Add delete branch flag to pr close
2020-08-19 21:11:48 -05:00
vilmibm
e44eb665a1 Merge remote-tracking branch 'origin/trunk' into prclose-delete 2020-08-19 21:06:04 -05:00
Nate Smith
ddfa1714d2
Merge pull request #1479 from wilso199/pr-checkout-submodules
PR Checkout - Recurse Submodules
2020-08-19 16:46:21 -05:00
vilmibm
16f69e9c12 fix tests 2020-08-19 16:40:13 -05:00
vilmibm
5c4f93ad0a Merge remote-tracking branch 'origin/trunk' into pr-checkout-submodules 2020-08-19 16:37:01 -05:00
Nate Smith
88b5a3b2f4
Merge pull request #1534 from mmontes11/pr-diff-use-default-pager
Using default pager in gh pr diff
2020-08-19 12:40:33 -05:00
vilmibm
2753f6fa48 Merge remote-tracking branch 'origin/trunk' into fix-milestone 2020-08-19 12:31:32 -05:00
vilmibm
b08255a720 bonus: GitHub Enterprise Server wording 2020-08-19 10:32:00 -05:00
vilmibm
cba401deb0 check parent annotatiosn for auth skip 2020-08-19 10:21:19 -05:00
vilmibm
621f6a262b minor 2020-08-19 10:11:16 -05:00
vilmibm
b1a6346e07 take out auto browser flow 2020-08-18 17:57:52 -05:00
vilmibm
ff9ecd2944 CTA for ghes remote auth case 2020-08-18 17:57:52 -05:00
vilmibm
850a7ef243 print nice login message when no auth detected 2020-08-18 17:57:52 -05:00
ShubhankarKG
130c5262b2 Refactor changes 2020-08-18 16:23:16 +05:30
ShubhankarKG
2b6535f951 Merge branch 'trunk' of https://github.com/cli/cli into newConfirmations 2020-08-18 11:25:43 +05:30
Martín Montes
df66a8f131 Using default pager in gh pr diff 2020-08-17 22:31:30 +02:00
Mislav Marohnić
d8c5b7bfc0
Merge pull request #1517 from cli/select-host
Allow explicitly setting hostname for gh operations
2020-08-14 19:08:13 +02:00
Mislav Marohnić
85f0f3aad7 Enable repo create for GHE 2020-08-14 19:02:17 +02:00
Nate Smith
544746e1ea
Merge pull request #1501 from cli/auth-refresh
gh auth refresh
2020-08-13 10:18:33 -05:00
Brandon Wilson
0d60798ca4
Gist Create - Output Filename (#1498) 2020-08-13 13:38:49 +02:00
vilmibm
1efd3ebb51 rebase strife 2020-08-12 12:07:36 -05:00
vilmibm
2f1e9ecc7a review feedback 2020-08-12 12:06:14 -05:00
vilmibm
f7ee39dfeb bonus: logout error if GITHUB_TOKEN is set 2020-08-12 12:05:56 -05:00
vilmibm
e6ae0a122b accept additional scopes in auth flow 2020-08-12 12:05:54 -05:00
vilmibm
f1c0d04bc0 gh auth refresh 2020-08-12 12:05:27 -05:00
Mislav Marohnić
4315c09501 Ignore non-pre-authenticated hosts when parsing git remotes
This ensures that while having git remotes to point to either
`github.com` or authenticated GHE instances, adding another git remote
pointing to an unrelated host won't change the remote resolution in any
way, even if the unrelated remote is called `upstream` or `github` (and
thus normally took precedence).
2020-08-12 18:13:05 +02:00
Mislav Marohnić
c095a4bead Allow explicitly specifying the hostname for gh operations
Accept the "HOST/OWNER/REPO" syntax or passing a full URL for both the
`--repo` flag and the GH_REPO environment variable and allow setting
GH_HOST environment variable to override just the hostname for
operations that assume "github.com" by default.

Examples:

    $ gh repo clone example.org/owner/repo
    $ GH_HOST=example.org gh repo clone repo

    $ GH_HOST=example.org gh api user
    $ GH_HOST=example.org gh gist create myfile.txt

    $ gh issue list -R example.org/owner/repo
    $ gh issue list -R https://example.org/owner/repo.git
    $ GH_REPO=example.org/owner/repo gh issue list
2020-08-12 16:16:34 +02:00
Mislav Marohnić
e7a8b1e94e
Add documentation for ":branch" placeholder 2020-08-12 14:54:58 +02:00
Francisco Miamoto
800be370de propagate error from closure 2020-08-12 09:18:43 -03:00
Francisco Miamoto
bba2d6d204 improve test cases 2020-08-12 09:09:37 -03:00