Mislav Marohnić
288d01318b
Respect the hostname of current repository in queries
2020-07-23 22:31:08 +02:00
vilmibm
b9ce1a1daf
pass resolving baserepo into newcmdview
2020-07-23 15:13:23 -05:00
vilmibm
d92c80b560
just swap BaseRepo implementation
2020-07-23 11:58:22 -05:00
vilmibm
086fb48d31
move displayURL
2020-07-23 11:25:31 -05:00
vilmibm
70c948a751
move isURL
2020-07-23 11:23:45 -05:00
vilmibm
dc02366128
move generateRepoURL to ghrepo
2020-07-23 11:16:47 -05:00
vilmibm
895af993a5
static not found error
2020-07-23 11:12:33 -05:00
vilmibm
12e88da400
w h i t e s p a c e
2020-07-23 11:10:25 -05:00
vilmibm
2a99ed9afb
add ResolvedBaseRepo
2020-07-23 11:01:29 -05:00
vilmibm
7b8d226e0f
remove redundant statement
2020-07-22 15:54:11 -05:00
vilmibm
a27c8a9c21
isolate repo view cmd
2020-07-22 15:54:11 -05:00
Mislav Marohnić
ac1333ace1
Merge pull request #1379 from cli/go-ldflags
...
Enable adding to GO_LDFLAGS without having to replace them all
2020-07-22 18:41:33 +02:00
Nate Smith
41376a3626
Merge pull request #1406 from cli/migrate-gist
...
migrate gist create to new command format
2020-07-22 10:47:03 -05:00
vilmibm
05419e46f0
put gist fixture file into gist package
2020-07-22 10:36:12 -05:00
Mislav Marohnić
97350e87a1
Merge remote-tracking branch 'origin' into migrate-gist
2020-07-22 16:17:30 +02:00
Mislav Marohnić
16739c3044
Whoops, gist create stderr is not empty
2020-07-22 14:59:35 +02:00
Mislav Marohnić
b195075644
Tweak approach to iostreams in tests
...
- avoid typecast to `*bytes.Buffer`
- assert that stderr is empty
2020-07-22 14:50:23 +02:00
Mislav Marohnić
41f7b054e6
Bump golangci-lint to v1.29.0
...
Trying to address https://github.com/cli/cli/pull/1406/checks?check_run_id=896316941
which I cannot reproduce locally on macOS
2020-07-22 14:18:18 +02:00
vilmibm
496ed477c5
linter appeasement
2020-07-21 17:47:44 -05:00
vilmibm
c06eacf4ee
remove obsolete ensureScopes
2020-07-21 17:42:52 -05:00
vilmibm
d12ff4b9e5
oauth scope check test
2020-07-21 17:39:49 -05:00
vilmibm
ba46362a7f
add createRun tests
2020-07-21 17:19:59 -05:00
vilmibm
5085a5eda2
WIP test works with mock
2020-07-21 15:17:30 -05:00
Nate Smith
1829be69f2
Merge pull request #1402 from cli/glamour-color
...
Adapt markdown rendering for light terminal backgrounds
2020-07-21 14:26:32 -05:00
Nate Smith
695721e5a6
Merge pull request #1388 from cli/repo-scriptability
...
repo command scriptability improvements
2020-07-21 14:22:54 -05:00
vilmibm
eb204c0dee
scriptability improvements for repo commands
2020-07-21 14:17:25 -05:00
Nate Smith
71bebd3f54
Merge pull request #1403 from cli/readme-markdown
...
Report HTTP and Markdown errors in `repo view`
2020-07-21 11:53:29 -05:00
Nate Smith
739d66b2d2
Merge pull request #1373 from cli/pr-scriptability
...
pr command scriptability improvements
2020-07-21 11:51:39 -05:00
vilmibm
1137e40a1f
use colorableErr
2020-07-21 11:46:51 -05:00
Mislav Marohnić
e373195817
WIP migrate gist create to separate package
2020-07-21 18:13:16 +02:00
Mislav Marohnić
86eacc3789
Enable unwrapping api.NotFoundError
2020-07-21 13:59:05 +02:00
Mislav Marohnić
71b13a81d0
Correctly report HTTP and Markdown errors in repo view
...
Any errors from fetching and rendering the README were silenced and
ignored in `repo view`. This change:
- Tolerates HTTP 404, but will raise exceptions for any other error;
- Moves markdown rendering from `api` package to command implementation;
- Ensures markdown rendering errors are correctly reported.
2020-07-21 13:47:27 +02:00
Mislav Marohnić
cbcc778d20
Adapt markdown rendering for light terminal backgrounds
...
Bonus: disallows trying to first read `notty` and `dark` style files from disk
2020-07-21 13:16:42 +02:00
Mislav Marohnić
6a48a604f0
Merge pull request #1383 from cli/gist-create-stdin
...
Fix creating gists from stdin with argument
2020-07-21 11:37:35 +02:00
vilmibm
fa928489b6
collapse open/draft state
2020-07-20 15:55:40 -05:00
vilmibm
f30f931695
fix tests
2020-07-20 15:55:37 -05:00
vilmibm
bffcbce716
restore nontty + web but suppress informational prints
2020-07-20 13:04:17 -05:00
vilmibm
168bd33bc9
pr command scriptability improvements
...
This commit improves behavior and error handling for pr commands when
run unattached to a tty.
- error if pr create and no -t/-f
- error if pr create and -w
- machine readable pr list
- machine readable pr view
- various cleanup of informational messages
2020-07-20 13:04:17 -05:00
Nate Smith
e18776c227
Merge pull request #1387 from cli/misc-scriptability
...
misc scriptability improvements
2020-07-20 12:33:58 -05:00
vilmibm
2dd42eb9aa
minor alias scriptability changes
2020-07-20 11:10:34 -05:00
Nate Smith
eb1b9122d8
Merge pull request #1386 from cli/terminal-check-state
...
remove package level terminal check state
2020-07-20 11:07:50 -05:00
vilmibm
b7765591b7
remove package level terminal check state
2020-07-17 15:02:05 -05:00
Mislav Marohnić
1545674d5c
💅 Tweak --public flag description
...
Trying to generally avoid "when true" in descriptions of boolean flags
2020-07-17 19:13:14 +02:00
Mislav Marohnić
a1a3e2d7bf
Pass FlagError by reference
2020-07-17 19:11:53 +02:00
Mislav Marohnić
73889e0c84
Merge pull request #1382 from cli/checkscopes-crash
...
Fix printing network error in case for failed HTTP requests
2020-07-17 19:09:29 +02:00
Mislav Marohnić
d90c387e04
Update gist create test
...
- use testify
- verify that the HTTP request is a POST to `/gists`
- more precise POST params matching in assertion
2020-07-17 18:24:34 +02:00
Mislav Marohnić
449fccf811
Enable passing stdin to gh gist create -
...
Goals:
- print command usage information on `gh gist create` when no args nor stdin
- disallow passing `-` as argument multiple times
- utilize Cobra's Args to do argument validation
2020-07-17 18:24:34 +02:00
Mislav Marohnić
2086ecb3d1
Fix printing network error in case for failed HTTP requests
...
The CheckScopes middleware tried to read from `res.Headers` before it
verified that `res` is available.
2020-07-17 18:24:13 +02:00
Mislav Marohnić
6c08cd696f
Enable adding to GO_LDFLAGS without having to replace them all
...
To produce a slimmer binary, this is now supported:
GO_LDFLAGS="-s -w" GH_VERSION="vX.Y.Z" make
2020-07-17 13:46:37 +02:00
Nate Smith
1f97a9a4d1
Merge pull request #1371 from cli/ignore-nondotcom-remotes
...
Revert to ignoring non-github.com git remotes
2020-07-16 12:05:37 -05:00