Mislav Marohnić
dfb774cd38
Verify HTTP stubs in pr checkout tests
2020-07-15 16:18:36 +02:00
Mislav Marohnić
c232c8872c
Abort pr checkout when PR has an invalid head branch name
2020-07-15 16:16:38 +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ć
6825944cad
Reference named queries in pr checkout HTTP stubs
2020-07-15 14:54:30 +02:00
Mislav Marohnić
c8cf54c10c
Merge pull request #1258 from cli/ghe-remotes
...
Parse and respect non-github.com git remotes
2020-07-15 13:07:30 +02:00
vilmibm
754dcb744c
catch up to trunk
2020-07-14 12:36:54 -05:00
vilmibm
97107661fe
review feedback
2020-07-14 12:30:53 -05:00
vilmibm
36ade42ba3
scriptability improvements: issue commands
...
This commit is part of work to make gh more scriptable. It includes both
some general purpose helpers towards this goal as well as improvements
to the issue commands. Other commands will follow.
- Adds `utils/terminal.go` for finding out about gh's execution environment
- introduces `stubTerminal` for either faking being attached to a tty or not during tests
- updates issue commands to behave better when not attached to a tty:
- issue list doesn't print fuzzy dates
- issue list doesn't print header
- issue list prints state explicitly
- issue create no longer hangs
- issue create fails with clear error unless both -t and -b are specified
- issue view prints raw issue body
- issue view prints metadata in a consistent, linewise format
2020-07-14 12:30:53 -05:00
Mislav Marohnić
87a9dc8d4b
Merge remote-tracking branch 'origin' into ghe-remotes
2020-07-13 13:39:14 +02:00
Mislav Marohnić
7a289861d2
Name more queries in test stubs
2020-07-10 20:20:33 +02:00
Mislav Marohnić
13b9c98b2b
Match named queries in test stubs
2020-07-10 20:04:54 +02:00
Sibi
2491e98c41
Title of the PR will be shown while closing, merging and re-opening & test cases updated
2020-07-08 12:22:38 +05:30
Sibi
125547fb7b
Show title while closing/reopening issue and meriging PR
2020-07-08 01:25:19 +05:30
Mislav Marohnić
e319aaa6ab
Tweak pr merge docs
2020-07-07 13:41:57 +02:00
Ravikanth C
6cbcdf2a74
Clarify how the branch can be retained after pr merge
2020-07-07 13:41:39 +02:00
Mislav Marohnić
a6ffea8cf5
Merge pull request #1310 from cli/linter-fix
...
Fix linter warning about sprintf within println
2020-07-07 10:37:54 +02:00
ShubhankarKG
37d6be58b8
Fixed gh issue close and gh issue reopen when issue number invalid
2020-07-06 17:57:34 +05:30
Mislav Marohnić
a8c37a1f5c
Fix hostname being respected in web browse commands
2020-07-02 20:54:07 +02:00
Mislav Marohnić
a68cefadd9
Merge remote-tracking branch 'origin' into ghe-remotes
2020-07-02 20:37:33 +02:00
Mislav Marohnić
446a4111f7
Respect hostnames when resolving git remotes and URL args to repos
2020-07-02 20:36:10 +02:00
Mislav Marohnić
ac7b56fc61
Fix linter warning about sprintf within println
2020-07-02 17:01:37 +02:00
Mislav Marohnić
6cc03d30ed
Merge pull request #1253 from cli/remove-global-repo-flag-for-real-this-time
...
Remove the global repo flag
2020-07-02 15:45:39 +02:00
Mislav Marohnić
cd5a0d69fb
:nail_polish: be clearer about the value passed to ResolveRemotesToRepos
...
`repo` will always be blank here, so replace the argument with a blank
literal instead.
2020-07-02 12:36:31 +02:00
Mislav Marohnić
ed781103c7
Merge pull request #644 from eddumelendez/add_filters_issues
...
Add filters issues
2020-07-02 12:24:30 +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
wilso199
10b4c8ab26
Adding config set example for vscode to docs
2020-06-30 18:17:05 -04:00
Mislav Marohnić
1ca3d171e6
Tweak HTTP 422 handling when deleting branches
2020-06-30 19:21:39 +02:00
Mislav Marohnić
db88ac4155
Declare -R, --repo flag on all issue and pr subcommands
2020-06-30 18:51:53 +02:00
Mislav Marohnić
15126a71c9
Merge remote-tracking branch 'origin' into remove-global-repo-flag-for-real-this-time
2020-06-30 17:39:45 +02:00
Mislav Marohnić
6ac61e90b7
Merge remote-tracking branch 'origin' into add_filters_issues
2020-06-30 14:24:30 +02:00
Mislav Marohnić
757bd05c7a
💅 tweaks for mention/milestone filter
2020-06-30 14:24:01 +02:00
Mislav Marohnić
ab903bdfc0
Merge pull request #1155 from metalogical/FIX-detached-head
...
fix regression in support for detached HEAD state
2020-06-24 17:01:22 +02:00
Mislav Marohnić
e4448c73e4
Respect original hostname in formatRemoteURL()
2020-06-23 20:06:50 +02:00
Mislav Marohnić
3ea71e6eb6
Add ability to parse non-GitHub.com git remotes
2020-06-23 19:51:26 +02:00
Corey Johnson
6d70f31b66
Merge pull request #994 from AliabbasMerchant/fix-incorrect-docs
...
Fix incorrect docs in Issue&PR create
2020-06-23 09:38:08 -04:00
Corey Johnson
625b673b58
Ignore repo flag errors in determineBaseRepo
2020-06-22 15:30:22 -04:00
Corey Johnson
2761739c29
Correct package name
2020-06-22 15:19:33 -04:00
Corey Johnson
6a02ad3f1b
Add repoflag to pr commands
2020-06-22 15:09:21 -04:00
Corey Johnson
dd8cbccbd5
Add repo flag to issue commands
2020-06-22 14:26:41 -04:00
Corey Johnson
8a4872bab3
Remove global repo flag
2020-06-22 14:07:49 -04:00
HowJMay
2fc4c000b5
fix typo
2020-06-22 15:19:50 +08:00
Mislav Marohnić
caa9b20eaf
Merge pull request #1243 from AliabbasMerchant/fix1219
...
Fix pr create not using .github/pull_request_template.md
2020-06-18 17:12:06 +02:00
AliabbasMerchant
ae695e98ce
Fix pr create not using .github/pull_request_template.md
2020-06-18 09:00:56 +05:30
Mislav Marohnić
4662abb312
Merge remote-tracking branch 'origin' into fix-incorrect-docs
2020-06-16 17:08:10 +02:00
Mislav Marohnić
518f751f58
Merge remote-tracking branch 'origin' into mislav/help-flag
2020-06-16 16:54:47 +02:00
Mislav Marohnić
27cce8e3ca
Apply the no-args handler to issue/pr status commands
2020-06-16 16:50:34 +02:00
Mislav Marohnić
3fea249d70
💅 tweak issue/pr create examples
2020-06-16 16:43:05 +02:00
Mislav Marohnić
f64e5f16eb
Add special case for unsupported gh <command> help
2020-06-16 16:06:51 +02:00
Mislav Marohnić
311536433c
The ultimate --help & spelling suggester handler
...
- short command usage output now lists subcommands instead of flags for
parent commands
- mistyping a subcommand now results in a non-zero exit status
- requesting `--help` or `-h` for any command now prints help docs on
stdout and exits with 0
2020-06-16 15:41:46 +02:00
Mislav Marohnić
ce59deb7b3
Show inherited flags in help output
2020-06-16 13:58:31 +02:00