Commit graph

61 commits

Author SHA1 Message Date
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ć
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ć
2fa8a85813 Unify checking whether search filters were passed by the user 2021-03-24 18:11:21 +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
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
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
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
boonhong
732e919a83 Add pr edit --base to change the base branch of a PR 2021-02-24 00:15:04 +08: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
Mislav Marohnić
0cd5744398 Un-export HasAPI leaky abstraction 2021-02-17 17:08:50 +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
Mislav Marohnić
83bb1bfd9d Port pr create to new templates implementation 2021-02-10 18:20:57 +01: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
Sam Coe
52bdcad8ea
Do not display minimized comments 2021-01-27 08:14:46 -08:00
Mislav Marohnić
28c2d042e7 Extend @me replacing behavior to issue list 2021-01-22 22:05:33 +01:00
Marc Lopez
6ad0c57a31 issue/pr create: add "@me" syntax to self-assign
Signed-off-by: Marc Lopez <marc5.12@outlook.com>
2021-01-22 20:41:17 +01:00
Mislav Marohnić
06cf2c9f81 Merge remote-tracking branch 'origin' into cmd-stub-new 2021-01-22 16:31:29 +01:00
Mislav Marohnić
a70b69e359
Bring the "Press Enter" UI closer to the authentication experience
- "Press Enter" is both bold
- "Enter" is capitalized
- The prompt ends with "..."
2021-01-21 09:47:38 -08:00
Sam Coe
a26fba7800
Comment on pull requests 2021-01-21 09:47:38 -08:00
Sam Coe
b9b1079493
Display reviews when viewing pull requests 2021-01-20 12:15:25 -08:00
Mislav Marohnić
fc77cbc964 Deprecate test.ExpectLines
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +01:00
Sam Coe
dee7077fcf
Extract shared comment and reaction group code 2020-12-09 14:35:29 -05:00
Mislav Marohnić
be39f4363b Make MetadataSurvey testable by accepting an interface 2020-12-03 17:47:40 +01:00
Mislav Marohnić
d6add864b8 Ensure efficient resolving of issue/pr create metadata to GraphQL IDs
For metadata types chosen in interactive flow, we fetch all records from
the API in order to be able to display a multi-select interface.

For metadata defined via command-line flags, we resolve records that can
be looked up directly, avoiding fetching the entirety of expensive
datasets (e.g. all members of an organization) if we can.

The new approach ensures efficient fetching when interactive flow is
combined with values from flags.
2020-12-03 15:53:13 +01:00
Cristian Dominguez
ab05736b98 don't reset previously added metadata 2020-11-25 13:30:54 -03:00
Cristian Dominguez
ea50666c30 Prompt: avoid resetting PR/issue metadata if no option is selected 2020-11-24 13:49:04 -03:00
vilmibm
cf37ce7463 no shorthand for --recover 2020-11-23 11:24:28 -08:00
vilmibm
d6e84a75fb switch to recover instead of resubmit 2020-11-23 11:21:34 -08:00
vilmibm
1d408eb30d linter appeasement 2020-11-23 11:21:28 -08:00
vilmibm
f68909b7a8 use TempFile though the testing is gross 2020-11-23 11:21:28 -08:00
vilmibm
fffd315a7e fix dumb test 2020-11-23 11:21:28 -08:00
vilmibm
d300526318 preserve and restore issue/pr input on failure 2020-11-23 11:21:28 -08:00
vilmibm
ef52376fe0 fix survey invocation 2020-11-13 10:35:32 -08:00
vilmibm
a686455fb6 add Draft to issue state 2020-11-12 12:17:37 -08:00
vilmibm
f5277e452e get everything working 2020-11-12 12:03:32 -08:00
vilmibm
0ed7879329 stop using Defaults struct 2020-11-12 12:03:20 -08:00
vilmibm
1c280d4341 stop using string pointer 2020-11-12 12:03:20 -08:00