This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
Dynamically construct the GraphQL query by using the `viewer` connection
if the owner isn't set and the `repositoryOwner(login:"...")` connection
if the owner was set.
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
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.
* 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
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.
- 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
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.