Mislav Marohnić
da2292723b
Merge remote-tracking branch 'origin' into ghe-api
2020-07-29 16:49:16 +02:00
Nate Smith
43318fd8e8
Merge pull request #1436 from cli/move-ask-stubber
...
move survey helper and test helpers to prompt pkg
2020-07-28 11:49:19 -05:00
Mislav Marohnić
c0b116b511
Merge remote-tracking branch 'origin' into ghe-api
2020-07-28 18:12:47 +02:00
vilmibm
245c3c7425
move survey helper and test helpers to prompt pkg
2020-07-27 17:00:09 -05:00
vilmibm
29f4453e07
final repo command cleanup
2020-07-27 14:09:07 -05:00
vilmibm
9359dcaf80
isolate credits
2020-07-27 13:56:15 -05:00
Mislav Marohnić
dd0d236629
Merge remote-tracking branch 'origin' into ghe-api
2020-07-27 20:13:54 +02:00
vilmibm
75cce0aaee
clarify usage
2020-07-27 13:06:25 -05:00
vilmibm
a6ac615f66
remove vestigial struct field
2020-07-27 13:04:31 -05:00
vilmibm
10422e87eb
just use simple bool flags
...
the original complexities here were because I thought there was a
shortcoming in cobra's bool support and I was wrong.
2020-07-27 13:04:31 -05:00
vilmibm
f3eb092d7e
isolate repo fork command and tweak usage
...
This commit is another isolation refactor, this time for repo fork.
However, I got fed up with the --remote="true|false|prompt" style of
flags and took this opportunity to switch to a set of bool flags:
--remote and --clone
--no-remote and --no-clone
the string args were really non standard and confusing; with only two
bools it was impossible to tell when to prompt.
2020-07-27 13:04:31 -05:00
vilmibm
a6c7a88e39
use dummy io streams for cobra
2020-07-27 10:14:02 -05:00
vilmibm
f84365ce08
use heredocs
2020-07-27 10:02:18 -05:00
vilmibm
dadcf4ba96
add prompt.StubConfirm
2020-07-27 10:00:19 -05:00
Mislav Marohnić
0cbcf8a7fa
Merge remote-tracking branch 'origin' into ghe-api
2020-07-27 16:30:20 +02:00
vilmibm
4c57566cdc
sigh
2020-07-24 15:40:59 -05:00
vilmibm
2dc8cad7c5
remove stray debugs
2020-07-24 15:26:25 -05:00
vilmibm
551c3661cb
linter appeasement
2020-07-24 12:29:06 -05:00
vilmibm
c34054bdc8
isolate repo create command
2020-07-24 12:26:27 -05:00
vilmibm
1831d95433
isolated clone command
...
This commit hacks the existing repo clone tests into something usable by
the new isolated command. It went ok and was less effort than trying to
introduce the same kind of test format as repo view and gist create.
2020-07-23 16:40:31 -05:00
Mislav Marohnić
8909a3e5c3
Try to avoid CodeQL warning
...
https://github.com/cli/cli/pull/1415/checks?check_run_id=904308295
2020-07-23 23:11:24 +02:00
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
vilmibm
05419e46f0
put gist fixture file into gist package
2020-07-22 10:36:12 -05: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
vilmibm
496ed477c5
linter appeasement
2020-07-21 17:47:44 -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
Mislav Marohnić
e373195817
WIP migrate gist create to separate package
2020-07-21 18:13:16 +02:00
Mislav Marohnić
75086f0b80
💅 Improve readability of api example code
...
Tab indentation is replaced with two spaces to curb deep indentation.
2020-07-16 17:46:25 +02:00
Mislav Marohnić
9e4af479da
Add command line docs for supported environment variables
2020-07-16 17:46:09 +02:00
Mislav Marohnić
b0fede93c9
Merge pull request #1365 from cli/pr-checkout-fixes
...
pr checkout fixes for branch names
2020-07-16 14:31:04 +02:00
Mislav Marohnić
07bee6a63c
Improve support for legacy issue/PR template names
...
Now supports names such as `PULL-REQUEST-TEMPLATE` (dashes instead of
underscores) and `issue_template.txt` (any file extension, including no
extension), is valid.
2020-07-15 18:16:16 +02:00
Mislav Marohnić
305cd290ee
Fix pr checkout <owner>:<branch> when it matches the default branch
...
First, consolidate the functionality between `pr merge` and `pr
checkout` that resolves the default branch name of the base repo. With
an added bonus, the new approach avoids an API request when one isn't
necessary.
Then, ensure that checking out 3rd-party PRs will result in local branch
name such as `<owner>/<branch>` when the head branch of the repository
matches the default branch of the base repository. We already have had
code in place to take care of this, but it only took effect in the `pr
checkout <number>`-style invocation.
2020-07-15 15:35:42 +02:00
Mislav Marohnić
13b9c98b2b
Match named queries in test stubs
2020-07-10 20:04:54 +02:00
Mislav Marohnić
ac04c878c0
Merge pull request #1279 from pborzenkov/delete-branch-422
...
Gracefully handle "422: Reference does not exist" when deleting remote branch
2020-07-02 12:11:12 +02:00
Mislav Marohnić
1ca3d171e6
Tweak HTTP 422 handling when deleting branches
2020-06-30 19:21:39 +02:00
AliabbasMerchant
7a04bf1672
api --silent Changes:
...
Show Response Headers (if requested) even with `--silent` flag
Shift silent tests to `Test_apiRun`
Changed usage string of `--silent` flag
2020-06-30 19:18:28 +05:30
AliabbasMerchant
aa43c55f60
Skip printing headers when --silent in api
2020-06-29 07:13:06 +05:30