Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
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