Commit graph

97 commits

Author SHA1 Message Date
Nate Smith
340f747944 Merge pull request #242 from github/debug-api
Dump HTTP request/response bodies when `DEBUG=api`
2020-01-22 14:05:29 -06:00
vilmibm
8c84fe3e3c just augment existing queries 2020-01-22 12:37:00 -06:00
Mislav Marohnić
0b0fd42ef3 Dump HTTP request/response bodies when DEBUG=api 2020-01-22 19:35:39 +01:00
vilmibm
fc25a4e9ed check for disabled issues in issue view command 2020-01-21 15:37:42 -06:00
vilmibm
bfdf89b579 updated based sorting and fuzzy time display on issue status 2020-01-17 15:38:41 -06:00
vilmibm
4925c3cf01 preview PRs and issues in the terminal with -p 2020-01-10 11:41:26 -06:00
Corey Johnson
4fcf13dac4 Make it work with PRs 2020-01-08 11:44:27 -08:00
Corey Johnson
3eb820631d Add "and x more" text" 2020-01-07 14:51:49 -08:00
Mislav Marohnić
00cede9e5f Fix issue list re: issues that have an assignee
Given the GraphQL query:

    issues(filterBy: {assignee: $assignee})

It turns out that passing a query variable `"assignee": null` is NOT
equivalent to omitting the variable altogether:

- `"assignee": null` seems to filter out issues that HAVE an assignee;
- omitting `assignee` correctly returns all issues.
2019-12-20 13:07:11 +01:00
Nate Smith
ade69a403c Merge pull request #178 from github/issues-disabled
Warn about repo issues disabled on `issue status/list/create`
2019-12-19 15:39:07 -06:00
Mislav Marohnić
9ddd50ffa9 Add tests for pr status reviews and checks output 2019-12-19 17:37:57 +01:00
Mislav Marohnić
aeb7f337d2 Ensure issue create fails fast if issues are disabled
Before, a person would be prompted for title & body before
unconditionally failing due to issues being disabled.
2019-12-19 15:44:20 +01:00
Mislav Marohnić
66534e504b Warn about repo issues disabled on issue create 2019-12-19 15:44:20 +01:00
Mislav Marohnić
915dd8b0ef Warn about repo issues disabled on issue status/list 2019-12-19 15:44:20 +01:00
Mislav Marohnić
d9ca764ac2 Look up the repository only once in issue status GraphQL 2019-12-19 15:44:20 +01:00
Corey Johnson
2979c5fc4c Use embeding 2019-12-12 11:27:22 -08:00
Corey Johnson
92642f4d53 Create NotFoundError 2019-12-11 10:58:59 -08:00
Corey Johnson
9b40efcad5 Add better gh pr view message 2019-12-10 16:03:10 -08:00
Corey Johnson
ee7f6339ae Return url for PRs 2019-12-05 09:54:30 -08:00
Mislav Marohnić
551f365bfc Merge pull request #129 from github/pr-arg-selector
Support issue/PR URLs & PR branch names passed as arguments
2019-12-04 22:03:07 +01:00
Corey Johnson
b6adf7f4b1 Merge branch 'master' into upgrade-gh-reminder 2019-12-04 09:55:23 -08:00
Mislav Marohnić
b223176b37 Accept issue URL in issue view <issue>
Also validates that the issue passed either by number or by URL exists.
2019-12-03 21:41:22 +01:00
Mislav Marohnić
29de133ccf Accept PR URL or branch argument in pr checkout <pr> 2019-12-03 21:19:09 +01:00
Mislav Marohnić
f87680e804 Explain multiple code paths 2019-12-03 19:52:45 +01:00
Mislav Marohnić
6aa1efcf9f Support --base and --label in combination with pr list --assignee 2019-12-03 16:00:11 +01:00
Mislav Marohnić
51d570e141 Merge remote-tracking branch 'origin/master' into pr-list-assignee 2019-12-03 11:41:50 +01:00
Corey Johnson
f8f0aa829e Only run in prod 2019-12-02 15:57:34 -08:00
Corey Johnson
dc91781214 Works with POST 2019-12-02 15:46:57 -08:00
Corey Johnson
1231ddd01c Add test 2019-12-02 15:08:36 -08:00
Mislav Marohnić
3e06cfff0d Improve mapping current branch to a PR in pr status 2019-12-02 20:40:14 +01:00
Mislav Marohnić
db8c2d4e01 Merge remote-tracking branch 'origin/master' into pr-current-branch 2019-12-02 18:56:11 +01:00
Mislav Marohnić
aeb060e012 Allow pr list filtering of assignee + state 2019-11-27 18:25:01 +01:00
Mislav Marohnić
1bf28927f0 Support -a, --assignee in pr list
This is for symmetry with `issue list`.

The problem is that the `Repository.pullRequests` connection doesn't
support filtering by assignee, therefore we need to switch to search API
in case an assignee was specified. This is awkward, but I don't see
another way.
2019-11-27 18:15:07 +01:00
Mislav Marohnić
6179570873 Replace "Recent issues" with "Issues opened by you" 2019-11-27 16:56:53 +01:00
Mislav Marohnić
d99698f048 Fix minor code issues discovered by staticcheck
`honnef.co/go/tools/cmd/staticcheck`
2019-11-26 16:18:20 +01:00
Mislav Marohnić
fdcf028cce Align issue list output with that of pr list 2019-11-22 17:15:11 +01:00
Mislav Marohnić
a650cbe002 Simplify parsing API issues 2019-11-22 17:04:32 +01:00
Mislav Marohnić
508f6787f0 Have PullRequestForBranch accept "owner:branch" value for forks
When on a `patch-1` branch locally, `gh pr view` would happily open the
first open PR it finds with "patch-1" as its head, even those coming
from forks.
2019-11-20 15:20:36 +01:00
Mislav Marohnić
c7a38b6331 Merge branch 'checks-crash' 2019-11-20 11:26:16 +01:00
Mislav Marohnić
8e89c0479e Merge pull request #95 from github/rename-file
Rename PR query file
2019-11-20 10:17:00 +01:00
Corey Johnson
89db5cbee6 Move to queries_pr 2019-11-19 14:59:17 -08:00
Corey Johnson
c1ad55ba64 use const 2019-11-19 14:57:52 -08:00
Mislav Marohnić
7c731bc512 Avoid crash when parsing in-progress CheckRuns
Fixes `panic: unsupported status: ""`

This occurs when a CheckRun has status "IN_PROGRESS" (or any other than
"COMPLETED") and when its `conclusion` would be null. I previously
didn't account for this.

This adds support for parsing state of an in-progress CheckRun.
2019-11-19 09:42:59 +01:00
Corey Johnson
20b47871a0 Add labels to the issues status 2019-11-18 14:56:15 -08:00
Corey Johnson
9aea93e5b2 Merge remote-tracking branch 'origin/master' into issue-update 2019-11-18 11:13:26 -08:00
Corey Johnson
e5af5be940 Merge remote-tracking branch 'origin/master' into issue-update 2019-11-18 11:09:00 -08:00
Mislav Marohnić
b640a3027a Merge pull request #80 from github/status-check-rollup
Strengthen PR Reviews+Checks GraphQL via `pe_mobile` feature flag
2019-11-18 20:00:25 +01:00
Corey Johnson
e8020077ae Remove debut statement 2019-11-18 10:34:25 -08:00
Nate Smith
dc4820a27f Merge pull request #87 from github/issue-status-open
Include open issues only in `issue status`
2019-11-18 12:13:27 -06:00
Mislav Marohnić
e7fed2e39c Include open issues only in issue status 2019-11-18 17:12:43 +01:00