Mislav Marohnić
47b7987772
Merge pull request #3402 from cristiand391/remove-unused-embedded-struct
...
Remove unused embedded struct
2021-04-20 18:48:19 +02:00
Nate Smith
d09896468d
Merge pull request #3351 from cristiand391/fix-pr-reopen
...
Fix detecting PR status when passing branch as arg
2021-04-20 11:41:16 -05:00
Mislav Marohnić
e63904bacd
Expose more fields for PR JSON export
2021-04-14 17:28:27 +02:00
Mislav Marohnić
3f22e3b353
Add pr status --json support
2021-04-13 21:12:30 +02:00
Mislav Marohnić
e158fac1a9
Restructure PullRequestStatus function
2021-04-13 20:54:09 +02:00
Mislav Marohnić
abe452bb19
Add --json export flag for issues and pull requests
...
The `--json` flag accepts a list of GraphQL fields to query for and
output in JSON format. To get the list of available flags, run the
command with a blank value for `--json`. Additional `--jq` and
`--template` flags are available just like in `gh api`.
2021-04-13 20:29:31 +02:00
Cristian Dominguez
b656b56061
Remove unused embedded struct
2021-04-12 12:40:00 -03:00
Cristian Dominguez
9c471fe7a5
Improve PR status detection
2021-04-08 00:23:22 -03:00
Cristian Dominguez
60d22b7d6d
Fix detecting PR status when passing branch as arg
2021-04-02 21:26:21 -03:00
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ć
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
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ć
dcff6c4f2d
Fix pr status for GHE 2.22 and older
...
This queries for the availability of the `branchProtectionRule` field on
"Ref" before trying to request it from GraphQL.
2021-02-18 17:46:13 +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ć
ebc5d01942
Merge remote-tracking branch 'origin' into auto-merge
2021-02-17 15:25:25 +01:00
Mislav Marohnić
12cf8ef65b
Separately query viewerMergeBodyText for GHE compatibility
...
GHE versions 2.22 and older will not have this GraphQL field. Avoid the
resulting error and have the command proceeed with empty text as the
default.
2021-02-17 14:06:27 +01:00
Nate Smith
c2c211dbed
Merge pull request #2952 from redreceipt/up-to-date
...
Adds Branch Up to Date Status
2021-02-16 12:50:28 -06:00
Mislav Marohnić
67bfedd56b
Add pr merge --auto
2021-02-16 16:01:22 +01:00
Cristian Dominguez
f75bd7280f
Pre-populate default merge commit message if no body was provided
2021-02-16 16:01:22 +01:00
Sam Coe
4ea8d25b85
Fix tests and polish
2021-02-16 15:59:44 +01:00
Cristian Dominguez
d57cb56945
Allow editing commit msg when squash merging a PR
2021-02-16 15:59:06 +01:00
Sam Coe
4fdf28d8a4
Change behavior of slice flags for issue edit and pr edit commands
2021-02-12 14:42:21 -08:00
Sam Coe
a47ee660a7
Pr edit command
2021-02-12 10:08:44 -08:00
Michael Neeley
9be9229a48
adds strict status checks
2021-02-12 08:51:47 -05:00
Michael Neeley
8511365afb
linter
2021-02-11 16:46:16 -05:00
Michael Neeley
0d55f8648c
adds merge state status
2021-02-11 16:27:23 -05:00
Mislav Marohnić
3ddd93793c
Port issue create to using templates API
2021-02-10 17:32:00 +01:00
Sam Coe
b366802aa1
Edit issue command
2021-02-04 10:54:34 -08:00
Nate Smith
4d28c79192
Merge pull request #2810 from ptxmac/ptx/pr-merge-body
...
Add body argument to `pr merge` command.
2021-01-21 15:25:42 -08:00
Sam Coe
a26fba7800
Comment on pull requests
2021-01-21 09:47:38 -08:00
Björn Heinrichs
c9f79271b1
Add --maintainer-edit flag ( #2250 )
...
* Add --maintainer-edit flag
Closes #2213 while retaining backwards compatibility.
* Fix linting
* Adjust documentation and validation
* Negate logic and fix build errors
* rename to no-maintainer-edit
* test
* use a positive option instead of negative
Co-authored-by: vilmibm <vilmibm@github.com>
2021-01-20 14:51:27 -08:00
Sam Coe
b9b1079493
Display reviews when viewing pull requests
2021-01-20 12:15:25 -08:00
Peter Kristensen
bc7f733267
Add body argument to pr merge command.
2021-01-20 13:24:27 +01:00
Sam Coe
9f101ff0a2
Add comments to pr view
2020-12-08 14:18:05 -05:00
Mislav Marohnić
21e2544d73
Sort latest PRs first when looking up PRs for a branch
...
Fixes #2452
2020-11-25 12:06:35 +01:00
Mislav Marohnić
fb621d2988
💅 code style
2020-10-28 15:50:59 +01:00
Mislav Marohnić
d09561d03c
💅 simplify sortPullRequestsByState
2020-10-28 15:50:59 +01:00
Mislav Marohnić
2ac68cc534
PullRequestForBranch: fix outdated error message
...
This method doesn't necessarily search through open pull requests.
2020-10-28 15:50:59 +01:00
Ian Billett
0f61272333
Allow PullRequestForBranch to search in closed pull requests
2020-10-28 15:50:59 +01:00
Mislav Marohnić
93c8fc1e98
Add tests for GraphQL introspection
2020-10-01 16:33:56 +02:00
Mislav Marohnić
0ef2863ede
Cache GHE responses for schema queries
...
This speeds up `pr`-related commands for GHE by caching schema
introspection queries for 24h.
2020-09-30 19:09:15 +02:00
Mislav Marohnić
ff925fb480
Resolve @me to current username on GHE
...
It looks like GHE v2.20 does not support `@me` in search yet.
2020-09-30 19:05:06 +02:00
Mislav Marohnić
bed9d11f7a
Avoid querying statusCheckRollup or reviewDecision on unsupported GHE
...
We first ask the GHE server for whether it supports these fields.
2020-09-30 19:04:09 +02:00
Mislav Marohnić
f30bc5bc64
Merge pull request #1552 from cli/release-cmd
...
Add commands for managing GitHub Releases
2020-09-09 18:07:19 +02:00
vilmibm
0c16a6b0b5
fix butchered query
2020-09-09 09:50:10 -05:00
Mislav Marohnić
ad0bbde351
Merge remote-tracking branch 'origin' into release-cmd
2020-09-09 15:27:49 +02:00