Commit graph

70 commits

Author SHA1 Message Date
Mislav Marohnić
f9e49f4aec Do not swallow prompt error during repo create 2021-09-16 12:25:44 +02:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
6ed2e8f7f8 Add completion support to repo create --gitignore and --license 2021-07-21 16:12:38 +02:00
Mislav Marohnić
1de756f6f3 💅 address review comments 2021-07-20 16:34:11 +02:00
Mislav Marohnić
5c21c949a0 Merge remote-tracking branch 'origin' into fix/private-repo-create 2021-07-15 12:58:00 +02:00
Mislav Marohnić
0ad153f696 Separate payload structs for REST vs GraphQL repo create
This enforces strict separation between serialization structs used for
repository creation payload with respect to whether GraphQL or REST was
used. Before, a field added to a GraphQL payload would leak to REST
payload (and vice versa).
2021-07-15 12:56:14 +02:00
Des Preston
17b58bf0b2 fix repo create --confirm
Respect the --confirm flag when deciding whether to prompt for gitignore
and license creation during `repo create`

Fixes #3989
2021-07-14 09:59:04 -04:00
Gowtham Munukutla
e600ce054a fix description related bugs in creating a template repo 2021-07-13 09:38:34 +05:30
Gowtham Munukutla
a1f26057de gofmt 2021-07-10 23:04:46 +05:30
Gowtham Munukutla
52550f0bee fix private repo creation in case of ignore templates 2021-07-10 23:03:16 +05:30
vilmibm
589b695bcf test for org + license/ignore 2021-06-30 17:41:39 -05:00
vilmibm
2723a01760 fix repo generation in org with license/ignore 2021-06-30 17:21:58 -05:00
Gowtham Munukutla
5c7da584e5 clone remote repo after creating with gitignore and license 2021-06-23 10:21:28 +05:30
Gowtham Munukutla
a44a3c8fd0 remove redundant logs 2021-06-17 10:41:24 +05:30
Gowtham Munukutla
137053399e tweak tests and add extra validations 2021-06-17 10:17:26 +05:30
Gowtham Munukutla
3c8e163e8b resolve PR comments. Tests WIP 2021-06-16 12:50:05 +05:30
Gowtham Munukutla
5c96d5d460 fix lint errors 2021-05-30 13:53:56 +05:30
Gowtham Munukutla
c4beed8276 complete tests 2021-05-30 13:42:39 +05:30
Gowtham Munukutla
9b87b13b80 add test cases WIP 2021-05-29 19:27:30 +05:30
Sam
9ec1e21d4c
Default to GHES host if only GHES is authenticated (#3286) 2021-03-30 16:51:00 +02:00
Mislav Marohnić
9e63199a65 Add tests for checking out repository after creating from template 2021-03-01 14:12:56 +01:00
Mislav Marohnić
e596f8732b Fix creating a repository from template
Fixes a problem where setting up a new local directory for the
repository created from a template would not contain any files:

    gh repo create -p OWNER/some-template my-repo --private --confirm
    ls my-repo
    //=> [empty directory]

Fixes #2290
2021-02-17 20:26:06 +01:00
Mislav Marohnić
a8fdd9a303 Further clarify what will happen on repo create
In local git directory:
1. `This will add an "origin" git remote to your local repository.  Continue?`
2. "origin" git remote is added in current directory.

Outside of a local git directory:
1. This will create the "REPO" repository on GitHub. Continue?
2. `Create a local project directory for "REPO"?`
3. new directory called "REPO" now set up for the GitHub repository.
2021-02-17 20:22:23 +01:00
ulwlu
95a8f926ab
Remove unnecessary Sprint 2021-02-13 18:10:38 +09:00
ulwlu
16be90c538
Fix unnecessary Sprintf with Sprint 2021-02-13 17:20:39 +09:00
ulwlu
e461baa217
Fix prompt string when creating remote repository
If you are in git project not pushed to remote yet,
prompt says 'This will create {reponame} in current directory. Continue?',
however, it doesn't create while it only adds remote origin.

I was going to create PR to avoid creating new directory before I knew
this behavior.
This behavior is already ideal, so I changed prompt not to scare users
like I got scared.
2021-02-13 17:11:08 +09:00
Mislav Marohnić
ab21dbeaf0 Improve repo create docs
- Clarify what will happen when in the git directory vs. out;
- List requirements for non-interactive use;
- Demonstrate how to turn issues/wiki off.
- Misc. formatting tweaks
2021-02-03 22:05:06 +01:00
Devon Romanko
2964895a77 fix test behavior changes from migration to run.Stub 2021-01-27 18:46:29 -05:00
Devon Romanko
696cbfc8d1 use Stub instead of SetPrepareCmd in 'repo create' tests 2021-01-27 07:59:32 -05:00
Mislav Marohnić
f46bab256c Rename to SuccessIconWithColor 2021-01-25 14:56:39 +01: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
vilmibm
3797aa72ff delete unused parameter 2021-01-19 19:08:49 -08:00
Mislav Marohnić
c308f1cd91 Prevent further use of SetPrepareCmd and InitCmdStubber 2021-01-18 22:44:53 +01:00
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03:00
xhqr
8b5c5896f2
[repo/create] Create local repo dir with non tty. (#2671)
This addresses issue #2587.
2021-01-05 14:40:52 -08:00
Josh Soref
e58b2dbe92 spelling: chestnuts 2020-11-21 21:43:51 -05:00
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
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
Sam Coe
458d5cb42f
Respect interactive repo name input on create 2020-09-21 14:26:15 +02:00
Mislav Marohnić
f9239661f2 Reuse the StubRepoInfoReponse test helper 2020-09-16 15:01:13 +02:00
vilmibm
a811e72c9d do not assume public when creating repo non-interactively 2020-09-11 11:57:40 -05:00
vilmibm
1073c97409 review feedback 2020-09-11 11:36:24 -05:00
vilmibm
c0fc31f7d5 use CanPrompt in commands 2020-09-10 12:13:48 -05:00
Colin Shum
99372f0dbc [Refactor] Add variadic argument to repoCreate to support templates 2020-08-28 15:02:08 -04: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