Mike Lundy
c4dfa597b8
add /v2 to the module name to resolve the module path problem
2020-04-16 16:30:07 -07:00
kfcampbell
3e6191742d
More minor updates.
2020-03-20 15:30:49 -07:00
Mislav Marohnić
2c83c152fa
[create] Fix newline in error message
...
Fixes #2162
2019-06-06 23:31:03 +02:00
Mislav Marohnić
57187d17ea
Merge branch 'remote_names'
...
Fixes https://github.com/github/hub/issues/2025
2019-02-13 01:39:16 +01:00
Mislav Marohnić
2d0f786b38
[create] Support `--remote-name <REMOTE>` argument
2019-02-13 01:37:52 +01:00
Mislav Marohnić
3ab153abe6
[create] Simplify checking for invalid first argument
2019-02-13 01:29:08 +01:00
Paul Gierz
e2be7f1960
remote name can be specified in the create command
2019-02-09 13:11:53 +01:00
Mislav Marohnić
c6ea574542
Merge branch 'args-parser'
2019-01-21 21:41:08 +01:00
Mislav Marohnić
f5df7cab9f
Passing values for long-form flags is now available without `=`
2019-01-21 21:35:15 +01:00
Mislav Marohnić
fba26b09fa
Clarify description and homepage fields for `hub create`
...
Fixes #2011 [ci skip]
2019-01-21 12:42:49 +01:00
Mislav Marohnić
db76bc5bf5
Switch `create` to new args parser
2019-01-18 03:47:50 +01:00
Mislav Marohnić
9ac583cacf
Improve `hub create` dealing with an existing "origin" remote
...
- No longer says "updating git remote", but not actually doing anything
- Shows a helpful warning about "origin" pointing to a possibly unrelated repo
2018-12-28 00:28:22 +01:00
Mislav Marohnić
85d58f9c68
Clarify some other long-form CLI options
2018-12-18 17:50:38 +01:00
Mislav Marohnić
258b700914
Indicate that long-form CLI flags are used like `--message=VALUE`
...
The previous format of documentation made it look like `--message VALUE`
(no equal sign) would be supported, which might be misleading.
2018-12-18 17:49:09 +01:00
Mislav Marohnić
d3ac6c474b
Fix `hub create` in place of a renamed repo
...
If you're trying to create `owner/foo` repo and there is an existing
redirect from `owner/foo` to a differently name repo, don't consider
that one as an existing repo and proceed with creating `owner/foo`.
2018-08-31 13:00:04 +02:00
Nick Mitchinson
8ab3b3366c
Address recent comment
2018-08-28 14:00:54 -05:00
Nick Mitchinson
249c47f918
First attempt at adding tests
2018-08-28 13:51:33 -05:00
Nick Mitchinson
c9cc29c0f8
Updates based on PR
2018-08-28 08:57:51 -05:00
Nick Mitchinson
7639c2608a
Prevent setting a public upstream when creating a private repo.
...
Fixes #1854
2018-08-28 02:01:48 -05:00
Mislav Marohnić
f7c1105df3
Copy to clipboard for `create`, `issue`, `pull-request`, `release`
...
Also add `--browse` functionality to `create` and `release` for parity
with `issue` and `pull-request`.
2016-09-11 18:21:23 +02:00
Mislav Marohnić
6fdc4c1a88
Change `hub create` to output the URL of the new repository
2016-09-11 04:42:24 +02:00
Mislav Marohnić
0c4689c673
Fix printing content on Windows after successful run
...
The old `args.After("echo", ...)` approach won't cut it on Windows since
there is no `echo` executable. Thus, nothing was printed on Windows.
Instead, expand Args type with extra functionality that allows Go
callbacks after all commands in the chain have been run.
Also, the new `args.NoForward()` is now preferred to `os.Exit()` since
it's more descriptive and allows `defer` in the calling function.
2016-09-10 23:49:58 +02:00
Mislav Marohnić
0d3617fd25
Infer project name from git workdir root name instead of PWD
...
The `create` and `remote` commands needs to infer the current project
name from the project's directory. Instead of using the current working
directory, which doesn't necessarily match the project's toplevel
directory, use `git rev-parse --show-toplevel` which also respects the
`-C` global flag setting.
Fixes #1105 , closes #1114
2016-02-28 20:51:21 +09:00
Mislav Marohnić
fc9fbd4c38
Cross-references galore!
2016-01-25 02:50:01 +11:00
Mislav Marohnić
0a45aa8ddc
Reformat inline command help and expand usage options
2016-01-25 02:30:46 +11:00
Keenan Brock
5355655711
rename gh command to hub in docs
2016-01-19 13:31:47 -05:00
Jingwen Owen Ou
177640dbd4
Extract logic of printing out to console
...
Introduce a `console` package which encapsulates logic of printing out
to console. This provides flexibility of discarding output in tests.
It also allows us to unify format of printing to console (if we want to).
This fixes #801 .
2015-02-20 13:19:24 -08:00
Mislav Marohnić
2cbd218342
Allow creating "origin" remote in `create` even if another remote exists
2014-12-24 20:55:51 -08:00
Jingwen Owen Ou
b3d5be4d93
Refactor to `configService` to read & write `Config`
...
`configService` can save and load `Config` using a strategy of `configEncoder` and `configDecoder`. This pave the path for swapping out `tomlConfigEncoder` and `tomlConfigDecoder` with `yamlConfigEncoder` and `yamlConfigDecoder`.
`Configs` also has been renamed to `Config`.
2014-09-14 17:46:13 -07:00
Jingwen Owen Ou
8bb46c2d84
Fix priority of loading origin remotes
2014-04-08 15:17:43 -07:00
Jingwen Owen Ou
f054bdf54e
Return error when prompting for host.
...
This'll make sure we propagate error to the caller where we can reformat
the error message within the context.
This fixes `features/authentication.feature:85`
2014-03-27 16:42:14 -07:00
Jingwen Owen Ou
4c7a2816bb
Rename more credential* to host
2014-03-25 17:18:30 -07:00
Jingwen Owen Ou
070d5e7b86
Rename Config.DefaultCredential()
2014-03-09 14:42:06 -07:00
Jingwen Owen Ou
498789a999
Change namespace to github/hub
2014-02-10 08:29:03 -08:00
David Calavera
109fb85818
Use a POSIX compatible flag parser.
...
So we can use flags before and after arguments, and we can group boolean flags, just like git does.
2013-12-29 15:07:58 -08:00
David Calavera
371ae8b432
Add global commands to the runner.
...
- Use a hash to lookup for commands.
- Add more tests for the command and runner execution.
2013-12-29 14:18:14 -08:00
Jingwen Owen Ou
ba6363328e
Pull in cucumber tests from Hub
...
Since 31a85e519e
...master
Some tests are ignored either because they don't make sense or WIP
2013-12-28 01:14:07 -08:00
Jingwen Owen Ou
b480db1f7f
Detach Project from GitHub
2013-12-17 07:45:48 -08:00
David Calavera
0c0dbcaaf4
Use the first configured credentials when there is only one.
...
This will avoid to ask for the github.com credentials when the only configuration is related to enterprise.
2013-12-14 14:34:23 -08:00
Jingwen Owen Ou
a613e633b0
Create is compatible with Hub
2013-12-10 13:42:54 -08:00
Jingwen Owen Ou
23f68481e4
Fix bug due to project owner and name parsing
2013-12-10 13:42:53 -08:00
Damian Gryski
fe6afdd459
typo fixes
2013-10-21 23:19:12 +02:00
Jingwen Owen Ou
f0c3b28ca0
Implement gh fetch
2013-07-10 16:29:26 -07:00
Jingwen Owen Ou
22350f0ec8
Fix bug not using project
2013-07-09 14:52:00 -07:00
Jingwen Owen Ou
83a4b6f1ac
Implement create
2013-07-09 14:36:02 -07:00
Jingwen Owen Ou
995c09c5ee
Add create stub
2013-07-09 11:03:07 -07:00