Commit graph

11279 commits

Author SHA1 Message Date
AliabbasMerchant
8f1aa9c864 Remove flag from PR list 2020-06-30 19:45:04 +05:30
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
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ć
4827ffbf03 Raise more informative path error when reading config file
Example:

    remove or rename regular file `/home/foo/.config/gh` (must be a directory)
2020-06-30 13:47:15 +02:00
AliabbasMerchant
aa43c55f60 Skip printing headers when --silent in api 2020-06-29 07:13:06 +05:30
AliabbasMerchant
5e56e31384 Added Test for --silent flag in api 2020-06-29 00:30:24 +05:30
AliabbasMerchant
cb2308c077 --silent flag in api 2020-06-29 00:15:34 +05:30
AliabbasMerchant
77a610f071 Tests for --web flag in issue and pr list 2020-06-28 23:17:57 +05:30
AliabbasMerchant
c12243ce10 Support --web flag in issue and pr list 2020-06-28 19:50:42 +05:30
Pavel Borzenkov
3afec6f90a api: gracefully handle already deleted remote refs
If a GitHub repo is configured to automatically delete branches after PR
is merged, `gh pr merge` fails with error like:

failed to delete remote branch: ... (422): 'Reference does not exist'

Gracefully handle such case and don't report the error.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2020-06-27 19:10:42 +03:00
Pavel Borzenkov
c66eebc6fb api: return structured error for failed API calls
`fmt.Errorf` hides information and makes it hard to test for specific
conditions in returned error. Return a structured error instead.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2020-06-27 18:47:34 +03:00
Pavel Borzenkov
aa8f8e8904 httpmock: propagate original HTTP request to HTTP response
So that it's possible to access it in mocked HTTP tests.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2020-06-27 18:47:06 +03:00
Mislav Marohnić
15a7ab6b92
Merge pull request #1187 from gabgodBB/Disabling_color_for_output_file
Issue #930 - Removing color for output files
2020-06-24 17:18:22 +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
Nate Smith
9c804907db
Merge pull request #1252 from cli/pr-checkout-maintainercanmodify
Fix `pr checkout OWNER:BRANCH` when maintainer can modify
2020-06-23 16:47:05 -05: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
Mislav Marohnić
657e633238
Merge pull request #1222 from cli/api-pagination
Add `api --paginate` option
2020-06-23 19:01:16 +02:00
Mislav Marohnić
c945fb4336 Automatically add per_page=100 to paginated REST requests
Most endpoints respect this parameter by default. Those that don't will
just ignore it. The `per_page=100` parameter is not added if there is
already a `per_page` parameter specified in the request.
2020-06-23 18:42:57 +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
Mislav Marohnić
ac7d5ecc44 Ensure markdown still passed through Glamour in no-color mode 2020-06-22 19:44:16 +02:00
Mislav Marohnić
e084a4563f Fix pr checkout OWNER:BRANCH when maintainer can modify
We did not use to request the necessary GraphQL fields to determine
whether the PR in question can be modified by maintainers (i.e. pushed
back to).
2020-06-22 19:36:55 +02:00
Mislav Marohnić
04b18ea8cb 🔥 unused var 2020-06-22 19:32:06 +02:00
Mislav Marohnić
55be0d2a9c Tweak isColorEnabled 2020-06-22 19:18:18 +02:00
Mislav Marohnić
53738c8803
Merge pull request #1249 from HowJMay/trunk
fix typo
2020-06-22 13:57:07 +02: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
Nate Smith
70c98a6a4e
Merge pull request #1192 from cli/triage-triage-triage
Add notes to triage doc
2020-06-17 13:07:59 -05:00
vilmibm
ab5cc6ae67 mention future label 2020-06-17 12:25:50 -05:00
Nate Smith
717f1da1e8
Merge pull request #1221 from cli/mislav/help-flag
The ultimate help/arguments handler
2020-06-17 11:20:58 -05:00
Mislav Marohnić
f4ecd365a6 api command: add GraphQL support for --paginate 2020-06-17 18:02:20 +02:00
Mislav Marohnić
3f940c98f1 Add assertion for 1st api request before pagination 2020-06-16 18:19:39 +02:00
Mislav Marohnić
7907def880 api command: add support for REST pagination 2020-06-16 18:16:49 +02:00
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ć
7b225bf1c9
Merge pull request #1147 from ShubhankarKG/issue_list
Added examples and custom error message for space separated issues
2020-06-16 16:53:02 +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
Mislav Marohnić
9c75cff94b Show command usage output on invalid flags being passed 2020-06-16 13:58:01 +02:00
Eddú Meléndez
cffd56f717 Rename to mention 2020-06-15 16:08:10 -05:00