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

31 Коммитов

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