Alan Donovan
f4491c7a80
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 11:40:20 -04:00
Alan Donovan
7215522123
use FlagError
2021-10-21 10:06:11 -04:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00
camille folch
568f4e4ee0
Minor refactoring for readability in NewCmdFork's runE
2021-06-11 23:28:41 -03:00
camille folch
54b86c7093
repo fork: check that --org is not the empty string
...
As it is already being done for --remote-name, except in this case
the default is the empty string.
2021-06-11 23:28:41 -03:00
Nate Smith
b0998772ae
more cleanup
2021-06-10 21:46:02 +00:00
Nate Smith
f31a31e2ed
stop stubbing out a Since function
2021-06-10 21:46:02 +00:00
vilmibm
4a7ec7f4f6
cleaning up fork tests
2021-06-10 21:45:54 +00:00
vilmibm
14de70a011
add defaultRemoteName
2021-06-10 21:44:49 +00:00
Mislav Marohnić
3cbd5b4934
Add repo fork --org functionality ( #3611 )
...
Co-authored-by: Gowtham Munukutla <gowtham.m81197@gmail.com>
2021-05-10 17:09:03 +02:00
Gowtham Munukutla
5caf01c564
add test for non tty fork
2021-04-01 10:49:12 +05:30
Gowtham Munukutla
745b3fec17
fix premature return while forking repo non interactively
2021-03-31 20:20:07 +05:30
Nate Smith
e91b97b4c5
fully restore fork remote renaming behavior ( #2982 )
...
* fully restore fork remote renaming behavior
* catch blank remote name and error + arg tests
* hard wrap fork usage
* do not rename if remote-name supplied
* tweak error text
2021-02-17 12:33:22 -06:00
Nate Smith
6152d8a419
Merge pull request #2825 from cli/rename-fork
...
restore fork rename behavior for nontty case
2021-01-25 11:29:52 -08:00
vilmibm
26f6761481
add note about future behavior
2021-01-25 11:29:26 -08:00
Mislav Marohnić
f46bab256c
Rename to SuccessIconWithColor
2021-01-25 14:56:39 +01:00
vilmibm
d051f0634f
update tests
2021-01-22 16:13:39 -08:00
vilmibm
1fa3047b59
restore renaming behavior for nontty case
2021-01-22 16:12:25 -08:00
Mislav Marohnić
96fa6e7830
Merge remote-tracking branch 'origin' into success-icon-consistency
2021-01-22 23:56:54 +01:00
Mislav Marohnić
23d68705bc
Match color of the success icon with the end state of the record
2021-01-22 23:55:33 +01:00
Mislav Marohnić
06cf2c9f81
Merge remote-tracking branch 'origin' into cmd-stub-new
2021-01-22 16:31:29 +01:00
Nate Smith
29805a4003
Merge pull request #2588 from cdce8p/gh-clone-fetch
...
Only fetch default branch when adding upstream remote
2021-01-21 12:57:10 -08:00
vilmibm
48c89076f6
add positive case test
2021-01-21 12:04:19 -08:00
vilmibm
a27a94f8b5
Merge remote-tracking branch 'origin/trunk' into repo-fork-gitflags
2021-01-21 11:58:20 -08:00
Mislav Marohnić
4158209d50
Merge pull request #2811 from cli/utils-spinner-buh-bye
...
Retire utils.Spinner in favor of IOStreams.StartProgressIndicator
2021-01-21 17:34:39 +01:00
vilmibm
509e5dd0c9
fix tests
2021-01-20 16:10:56 -08:00
vilmibm
99c312e8ce
accept a remote name instead of doing magic remote naming in repo fork
2021-01-20 15:32:19 -08:00
vilmibm
03f99a0140
Merge remote-tracking branch 'origin/trunk' into remote-renaming-847
2021-01-20 15:10:20 -08:00
Mislav Marohnić
aa0de5f636
Stop using utils.Spinner in repo fork
2021-01-20 14:46:45 +01:00
Mislav Marohnić
fc77cbc964
Deprecate test.ExpectLines
...
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +01:00
Mislav Marohnić
5531498f27
Migrate to new cmd stubber in repo fork tests
2021-01-18 22:42:27 +01:00
cdce8p
f536901bc1
Only fetch DefaultBranchRef when adding upstream remote during gh repo clone
2020-12-09 20:15:21 +01:00
Nate Smith
05a1a25271
match parent repo protocol when forking ( #2434 )
...
* match parent repo protocol when forking
* guard against nil and prefer PushURL
2020-11-20 12:00:49 -06:00
dfireBird
e513333fb1
feat: implement prompt for remote renaming
2020-11-17 00:13:26 +05:30
Mislav Marohnić
5b4a08dcb9
Ensure that only PATH is searched when shelling out to external commands
...
Works around https://github.com/golang/go/issues/38736 for Windows.
2020-11-11 16:33:13 +01:00
Cristian Dominguez
07bd647211
Update repo fork help msg
2020-11-04 12:14:02 -03:00
Cristian Dominguez
97aa0b2f7d
Warn when passing git flags without repository arg
2020-11-04 12:10:35 -03:00
vilmibm
a2aa154794
port entirely to ColorScheme
2020-10-29 12:37:45 -07:00
Cristian Dominguez
c6938941d5
Fix typo
2020-10-23 22:32:26 -03:00
Cristian Dominguez
69b64507ea
Add support for git flags in gh repo fork
2020-10-23 19:08:55 -03:00
vilmibm
c0fc31f7d5
use CanPrompt in commands
2020-09-10 12:13:48 -05: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
vilmibm
35f18b6c02
gh auth login
2020-08-06 12:43:35 -05:00
Mislav Marohnić
ffe08995bb
Add notes about GHE support for git_protocol
2020-07-29 22:50:53 +02:00
vilmibm
75cce0aaee
clarify usage
2020-07-27 13:06:25 -05:00
vilmibm
a6ac615f66
remove vestigial struct field
2020-07-27 13:04:31 -05:00
vilmibm
10422e87eb
just use simple bool flags
...
the original complexities here were because I thought there was a
shortcoming in cobra's bool support and I was wrong.
2020-07-27 13:04:31 -05:00
vilmibm
f3eb092d7e
isolate repo fork command and tweak usage
...
This commit is another isolation refactor, this time for repo fork.
However, I got fed up with the --remote="true|false|prompt" style of
flags and took this opportunity to switch to a set of bool flags:
--remote and --clone
--no-remote and --no-clone
the string args were really non standard and confusing; with only two
bools it was impossible to tell when to prompt.
2020-07-27 13:04:31 -05:00