Mislav Marohnić
05c7c2bd1a
Treat unrecognized PR Checks statuses as "pending"
...
Previously, unrecognized Checks statuses would crash the program. For
the sake of supporting the "WAITING" status and for
forward-compatibility, this treats any unrecognized status as "pending".
2021-03-31 18:21:45 +02:00
Mislav Marohnić
57536e7b0d
💅 cleanup URL length checking
2021-03-30 19:12:31 +02:00
Cristian Dominguez
fb39c38c85
Disable preview option in prompts if URL size is too long
2021-03-30 19:12:31 +02:00
Mislav Marohnić
d22e72a373
Fix tests broken by incompatible merges
2021-03-30 18:39:37 +02:00
Mislav Marohnić
44ae7ae3cf
Merge pull request #3279 from cli/browser-refactor
...
Pass web browser to each individual command
2021-03-30 16:54:59 +02:00
Mislav Marohnić
63a47d0334
Merge pull request #3295 from cli/labels-and-combinator
...
BREAKING: lookup all issue/PR labels with "AND" instead of "OR"
2021-03-30 16:52:14 +02:00
Mislav Marohnić
210d9dff20
Remove implicit sort:created-desc sort clause for pr list
...
This is the default sort mode for issues, so it's not needed to
explicitly set it. Furthermore, the user can specify their own sort mode
through the `--search` option.
2021-03-25 13:44:07 +01:00
Mislav Marohnić
2fa8a85813
Unify checking whether search filters were passed by the user
2021-03-24 18:11:21 +01:00
Mislav Marohnić
949df38d49
BREAKING: lookup all issue/PR labels with "AND" instead of "OR" combinator
...
This switches to the Search API whenever labels are specified in `issue
list` or `pr list`. This ensures that the results match those that would
be returned in the web UI.
2021-03-24 18:04:25 +01:00
Mislav Marohnić
f008c61d13
WIP fix filter
2021-03-24 17:54:20 +01:00
Mislav Marohnić
0131541bb2
Add tests for listPullRequests
2021-03-24 16:46:45 +01:00
Mislav Marohnić
4388c1db14
Add pr list --author filter
2021-03-24 16:46:45 +01:00
Mislav Marohnić
01bbb15b57
Add pr list --search
2021-03-24 16:46:45 +01:00
Mislav Marohnić
75cfed4bef
Import PR list API implementation to pr/list package
...
Also splits List vs. Search queries into separate methods for better
maintanability.
2021-03-24 16:46:42 +01:00
Mislav Marohnić
179d3f0249
Add a unified GitHub Search query builder
2021-03-23 18:52:58 +01:00
Gowtham Munukutla
70d4873914
add generic search naming for issues and PRs @samcoe
2021-03-23 18:10:46 +01:00
Mislav Marohnić
80035aa686
💅 cleanup switching to search mode in issue list
2021-03-23 18:08:14 +01:00
Gowtham Munukutla
f791bbdbcb
add search feature in listing issues
2021-03-23 18:08:14 +01:00
Mislav Marohnić
e53d02b680
Add back isolated tests for issue/PR lookup by argument
2021-03-22 12:55:04 +01:00
Mislav Marohnić
111e8dbcf2
Pass web browser to each individual command
...
This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
2021-03-19 21:22:37 +01:00
Nate Smith
2ab073d599
Refactor use of glamour to allow style overrides ( #3243 )
...
* Refactor use of glamour to allow style overrides
* leave the things the way they were and just expose the ability to set overrides
2021-03-19 16:29:32 +00:00
Nate Smith
126b498e9f
Actions Support Phase 1 ( #2923 )
...
* Implement first round of support for GitHub Actions
This commit adds:
gh actions
gh run list
gh run view
gh job view
as part of our first round of actions support. These commands are
unlisted and considered in beta.
* review feedback
* tests for exit status on job view
* spinner tracks io itself
* review feedback
* fix PR matching
* enable pager for job log viewing
* add more colorf functions
* add AnnotationSymbol
* hide job, run
* do not add method to api.Client
* remove useless cargo coded copypasta
2021-03-16 13:59:34 -07:00
Mislav Marohnić
d5fb817dfc
Remove unnecessary BodyFile field
2021-03-15 15:12:41 +01:00
Cristian Dominguez
8bfe64d593
Accept --body-file flag if --body is supported
2021-03-15 15:12:41 +01:00
Gowtham Munukutla
1d8dd2f1e9
add tests for additions and deletions
2021-03-06 15:02:16 +05:30
Gowtham Munukutla
f2489ed22f
reduce arg length to fprintf
2021-03-05 14:05:41 +05:30
Gowtham Munukutla
bdd663e658
Add additions and deletions in pr view raw as well
2021-03-05 13:41:25 +05:30
Gowtham Munukutla
9944698665
Add additions and deletions in pr view
2021-03-05 11:20:49 +05:30
Mislav Marohnić
e96d974331
Merge pull request #3023 from cli/cancel-error-status
...
Issue/pr create: exit with nonzero status code when "Cancel" was chosen
2021-03-04 13:45:11 +01:00
Mislav Marohnić
3444d00bee
Merge pull request #3018 from castaneai/pr-create-body-file
...
Add `pr create --body-file` flag
2021-03-02 15:21:17 +01:00
Mislav Marohnić
dd34cae112
Merge remote-tracking branch 'origin' into cancel-error-status
2021-03-02 13:52:07 +01:00
Mislav Marohnić
2ebdde1ddd
Exit with status code "2" on user cancellation errors
...
This also stops printing "interrupt" after Ctrl-C is pressed.
2021-03-02 13:48:44 +01:00
Sam
a49654970c
Merge pull request #3024 from cli/normalize-pr-commands
...
Normalize pr command arguments
2021-02-26 10:31:06 -08:00
Mislav Marohnić
823514022d
Merge pull request #3036 from cli/pr-merge-no-commits
...
Avoid crash in `pr merge` when the pull request has no commits
2021-02-26 13:08:27 +01:00
Mislav Marohnić
e4ce0d76aa
Merge pull request #3022 from ganboonhong/pr-edit-branch
...
Add `pr edit --base` to change the base branch of a PR
2021-02-24 15:57:50 +01:00
Mislav Marohnić
0f85304e3e
Avoid crash in pr merge when verifying whether a PR had diverged
...
A PR is not guaranteed to have commits, it seems, so add a guard against
assuming that there is always a head commit.
2021-02-24 14:37:29 +01:00
Gowtham Munukutla
56ead91702
Add helper function to validate exact args in cmdutil
2021-02-24 15:49:40 +05:30
Sam Coe
34da59777b
Revert close and reopen changes
2021-02-23 13:24:48 -08:00
Mislav Marohnić
3efa764305
Avoid the issue/pr recovery mechanism handling Ctrl-C keypress in prompts
...
Either InterruptErr or SilentErr will be present when the user has
chosen "Cancel" or pressed Ctrl-C in prompts. We don't want the recovery
mechanism to kick in these cases because the cancellation was likely
willingly initiated by the user.
2021-02-23 20:09:03 +01:00
Mislav Marohnić
fff051468e
Avoid triggering recovery mechanism when cancelling issue/pr create
2021-02-23 19:42:41 +01:00
Sam Coe
9d062ed8fc
Normalize pr command arguments
2021-02-23 09:17:35 -08:00
boonhong
732e919a83
Add pr edit --base to change the base branch of a PR
2021-02-24 00:15:04 +08:00
Mislav Marohnić
b0b90afa87
issue/pr create: exit with nonzero status code when "Cancel" was chosen
...
This is to indicate that the command had not finished successfully.
2021-02-23 17:06:29 +01:00
Mislav Marohnić
fee7adf9ba
Add issue create -F <file> flag and tests
2021-02-23 14:25:32 +01:00
castaneai
13c3c6543b
Add pr create --body-file flag
2021-02-23 12:58:34 +01:00
Mislav Marohnić
a90997ec95
pr merge: avoid prompting to enter editor after editing phase is chosen
...
When user chooses "Edit commit message", open the editor immediately
instead of showing an additional prompt to open the editor.
2021-02-17 18:47:17 +01:00
Mislav Marohnić
70d4786e37
Merge pull request #2988 from cli/strict-status-checks-base
...
pr status: fix checking branch protection rules on the base branch
2021-02-17 18:13:15 +01:00
Mislav Marohnić
05421db404
pr status: fix checking branch protection rules on the base branch
...
Instead of checking branch protection rules on the main branch of the
repository, branch protection rules for a specific PR should be checked
on its base branch, since not all PRs are based on the main branch.
Additionally, do not display "Up to date" if the actual merge status
reported from the server was "UNKNOWN" or "DIRTY", since in those cases
"Up to date" could be false information.
2021-02-17 18:04:49 +01:00
Mislav Marohnić
3b117e6c3c
Merge pull request #2539 from divyaramanathan/issue-create-template
...
Implementing issue template GraphQL API call
2021-02-17 17:59:42 +01:00
Mislav Marohnić
3a0a8c4e25
Add tests for templateManager
2021-02-17 17:35:04 +01:00