Mislav Marohnić
924e8b881f
Fix parsing boolean flags with explicit values
...
Fixes #2590
2020-08-11 17:30:24 +02:00
Mike Lundy
c4dfa597b8
add /v2 to the module name to resolve the module path problem
2020-04-16 16:30:07 -07:00
kfcampbell
8db8f617d1
Merge master to resolve merge conflict.
2020-04-13 10:09:50 -07:00
kfcampbell
289ee4e8ee
Another (last?) pass at missed linting errors.
2020-04-13 09:33:16 -07:00
kfcampbell
425a75f368
Lint md2roff-bin, ui, utils dirs.
2020-04-12 17:31:50 -07:00
lufia
95f8bb72be
Replace bmizerany/assert with internal/assert
2020-04-03 16:54:01 +09:00
Mislav Marohnić
7b02a665dd
Fix `hub help <cmd>` on Windows
...
Fixes #2384
2019-12-10 12:15:24 +01:00
Christian Muehlhaeuser
12c49c633a
Avoid unnecessary conversions
...
No need to covert these types.
2019-07-23 09:36:19 +02:00
Mislav Marohnić
ce213d7c8f
[env] Enable quoted values with spaces in $BROWSER
...
Makes possible:
BROWSER='"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --extra --flag' hub browse
Fixes #2178
2019-06-28 21:41:17 +02:00
Mislav Marohnić
b6d9837aa7
[api] Implement GraphQL pagination
...
The GraphQL query has to accept the optional `endCursor` string variable
and output `pageInfo`:
pageInfo {
hasNextPage
endCursor
}
2019-06-15 15:54:07 +02:00
Mislav Marohnić
3625691293
[cli] Have commands with rich output respect the `--color` flag
...
- default: `--color=auto`
- `--color` is equivalent to `--color=always`
- `--color=never` disables color for TTYs
2019-02-18 14:21:25 +01:00
Mislav Marohnić
7ea9a151b4
[CLI] Fix parsing empty string within arguments
...
Fixes https://github.com/github/hub/issues/2036
2019-02-13 01:27:34 +01:00
Mislav Marohnić
9ef7b64b7c
[api] Improve documentation
2019-02-07 04:22:59 +01:00
Mislav Marohnić
1567d0c495
[api] New `hub api` command
2019-01-24 20:05:26 +01:00
Mislav Marohnić
c4d1838898
Crash reporter improvements
...
- print error output on stderr instead of stdout
- only prompt to open an issue if connected to terminal
- get rid of "always" option in the prompt
- empty response to the prompt is interpreted as a "no"
2019-01-24 16:02:26 +01:00
Mislav Marohnić
2ca05c036e
Switch `browse` to new args parser
2019-01-18 01:50:29 +01:00
Mislav Marohnić
ae96e939d3
Initialize ArgsParser from usage string
2019-01-17 02:39:08 +01:00
Mislav Marohnić
9eae131eef
Create a lightweight CLI flag parser
...
Design considerations:
- treats `--flag=VALUE` as equivalent of `--flag VALUE`
- treats `-abcVALUE` as equivalent to `-a -b -c VALUE`
- allows `--opt=false` as opposite of `--opt` or `--opt=true`
- retrieve values as string, slice of strings, bool, or int
2019-01-17 02:39:08 +01:00
Mislav Marohnić
1c2c69ae44
Simplify picking contrasting label text color
...
Pick between white and black depending on which one is the first to
satisfy the contrast ratio of 7.0 (or 4.5 as fallback).
2019-01-03 04:40:15 +01:00
Mislav Marohnić
d0310e9c4b
Restore compatibility with Go 1.8/1.9
2019-01-03 02:47:14 +01:00
Andrew Janke
cd307c4c81
Use uint8 RGB color components
2019-01-02 16:46:52 -05:00
Andrew Janke
de9bf5bbee
Improve contrast ratio for label text coloring
2018-12-28 05:55:01 +01:00
Andrew Janke
dede9106c2
256-color terminal support
2018-12-28 05:31:08 +01:00
tariqibrahim
4c1dd1b96f
Adding unit tests for util methods
2018-10-28 15:38:31 -07:00
Mislav Marohnić
24ed64e477
Add relative date format to `issue` output
2016-08-16 17:29:41 +02:00
Mislav Marohnić
9f83b387ee
Merge remote-tracking branch 'origin/master' into revamp-issues
2016-08-14 19:50:28 +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ć
486df9eaab
Print colored labels for `hub issue`
2016-02-03 23:33:09 +11:00
Mislav Marohnić
21089ec0e4
Change `hub help` to display man pages when available
...
Instead of displaying plain text help, `hub help <command>` will now
search for man pages to display.
* If `man` is available, hub first tries to locate the local
`../man/hub-<command>.1` file relative to the `hub` executable. If
found, open it with `man`. If not, execute `man 1 hub-<command>`.
* Otherwise, resort to displaying plain text help.
2016-01-25 02:30:47 +11:00
Mislav Marohnić
1b862e3388
Switch from godep & rewriting import paths to GO15VENDOREXPERIMENT
2016-01-20 14:46:44 +11: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
Jingwen Owen Ou
6137851f15
Vendor dependencies by rewriting import paths
2014-11-30 09:16:57 -08:00
Jingwen Owen Ou
b1ad2af009
Print error to stderr instead of using log
2014-02-21 10:22:17 -08:00
David Calavera
04d6f2bd21
Move autoupdate configuration to the global git config.
2014-01-07 21:29:32 +01:00
David Calavera
92a6010916
Do not modify fatal output.
2014-01-04 17:04:00 -08:00
David Calavera
b3a1a093bf
Capture panic errors and notify them as unexpected crashes.
2014-01-04 16:57:52 -08:00
Jingwen Owen Ou
a613e633b0
Create is compatible with Hub
2013-12-10 13:42:54 -08:00
Jingwen Owen Ou
f0c3b28ca0
Implement gh fetch
2013-07-10 16:29:26 -07:00
Jingwen Owen Ou
f72c133ba7
Remove utils.Fatal
2013-07-04 16:29:19 -07:00
Jingwen Owen Ou
48404b97a9
Fix utils
2013-06-22 07:41:32 -07:00
Jingwen Owen Ou
022d899c2b
Implement add remote for current user
2013-06-21 18:02:29 -07:00
Jingwen Owen Ou
e730f8b129
Add tests for WebUrl
2013-05-31 16:50:02 -07:00
Jingwen Owen Ou
6cdb7e2e11
Implement gh browse
2013-05-31 16:32:30 -07:00
Jingwen Owen Ou
9fe0a8cff4
Correctly parse gh browse args
2013-05-31 15:24:24 -07:00
Jingwen Owen Ou
3798e7818a
Add browser launcher
2013-05-30 17:24:06 -07:00
Jingwen Owen Ou
64fa816809
Move code to proper subpackages
2013-05-29 12:01:12 -07:00