Mislav Marohnić
ad0dedd1ac
Enable issue list pagination
...
Makes it possible to set a `--limit` greater than 100.
2020-02-24 22:18:31 +01:00
Dasio
8aa46c236e
Init slice with provided capacity if it's known in advance
2020-02-24 22:16:41 +01:00
Dasio
327dae95a3
Use break label instead of goto
2020-02-24 21:18:34 +01:00
wingkwong
a2109c414c
feat: add gist queries #397
2020-02-25 01:26:24 +08:00
Toshiya Doi
9c44eaeb6e
Define an order clause to sort PRs newest first
2020-02-25 01:27:19 +09:00
Toshiya Doi
b7893b1fd3
Query pullRequests of the current branch regardless of its state
2020-02-22 16:54:30 +09:00
Mislav Marohnić
9c00ac0224
Tweak verbose HTTP logging
...
- log headers only in DEBUG=api mode
- enable color output on stderr
- hide little-useful TLS debbuging info
- ensure all request headers are logged
2020-02-21 12:57:00 +01:00
Henrique Vicente
e7c88d0fb1
impr(verbose): using package httpretty to log requests on DEBUG.
2020-02-21 02:46:18 +01:00
UmairShahzad
bb0fe46db6
total match count in title
2020-02-20 01:54:51 +05:00
vilmibm
dd57b891d3
add helper for stubbing repo resolve response
2020-02-12 08:48:04 -06:00
Mislav Marohnić
a710893fc1
Rename to cli/cli
2020-01-24 16:08:52 +01:00
Mislav Marohnić
b44dad2319
Merge remote-tracking branch 'origin/master' into no-errors-wrap
2020-01-23 16:46:56 +01:00
Mislav Marohnić
22fe0839fa
Merge remote-tracking branch 'origin/master' into ghrepo-interface
2020-01-23 14:19:10 +01:00
Mislav Marohnić
4f6dfee965
Merge remote-tracking branch 'origin/master' into pr-create-just-works-TM
2020-01-23 14:08:07 +01:00
Mislav Marohnić
9122bc181c
Migrate away from errors.Wrap()
...
Turns out the "standard" way of wrapping errors in Go is via
`fmt.Errorf("%w")`, which doesn't require an external package and also allows a
finer control of error sentence formatting.
2020-01-23 13:19:28 +01:00
Mislav Marohnić
1f90579d2a
Extract common interface for a GitHub Repository
...
Also define a handful of utility methods:
- `New(owner, repo)`
- `FullName`: the name slash owner pair
- `FromFullName`: parse the name slash owner pair
- `FromURL`: parse a GitHub.com URL
- `IsSame(r1, r2)`: compare two repositories
2020-01-22 22:44:46 +01:00
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
Mislav Marohnić
a767fd7910
Add code comments for tricky parts
2020-01-22 18:37:50 +01:00
Mislav Marohnić
e2a825effb
Auto-fork on pr create if no pushable target found
2020-01-22 18:32:06 +01:00
Mislav Marohnić
2aaffc69a2
Clean up obsolete struct
2020-01-21 23:20:50 +01:00
Mislav Marohnić
6c49614db7
Fix tests
2020-01-21 22:56:15 +01:00
vilmibm
fc25a4e9ed
check for disabled issues in issue view command
2020-01-21 15:37:42 -06:00
Mislav Marohnić
7a614ce697
Support triangular git workflows in pr create
...
- The local git remotes are scanned and resolved to GitHub repositories
- The "base" repo is the first result resolved to its parent repo (if a fork)
- The name of the default branch is read from the base repo
- The "head" repo is the first repo that has push access
2020-01-21 18:26:08 +01: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