Commit graph

120 commits

Author SHA1 Message Date
Sam Coe
e14d14cef2
Add support for issue state reason (#6245) 2022-09-14 12:39:15 +04:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Mark Woods
e876b22963
Change markdown wrap limit match terminal width (#6016) 2022-09-01 07:36:25 +00:00
Sam Coe
45f1a71c8b
Remove all direct calls to shurcool-graphql 2022-08-18 21:40:41 +03:00
vilmibm
41385477c3 fix linting 2022-07-27 14:15:27 -05:00
vilmibm
d5334f4115 Revert "update linter checks"
This reverts commit 40ecb8c188.
2022-07-27 13:30:41 -05:00
vilmibm
40ecb8c188 update linter checks 2022-07-26 16:06:52 -05:00
Sam Coe
074ed50b8a
Integrate go-gh API package (#5614) 2022-06-23 04:05:31 +01:00
wilhelm
0f02371734
clear pr create multiselect on select 2022-06-22 17:43:41 +10:00
Mislav Marohnić
4c6358dcbf Guard PR merge queue queries behind feature detection 2022-06-08 12:25:22 +02:00
Sam Coe
539b150833
Extract feature detection package (#5494) 2022-05-17 19:07:44 +00:00
Sam Coe
d244346960
Replace uses of strings.Title (#5623) 2022-05-12 13:52:21 +00:00
Mislav Marohnić
5cb4e4d862
Merge pull request #5570 from koskeller/submit-as-draft-option-pr-create
pr create: add "Submit as draft" interactive option
2022-05-10 17:17:07 +02:00
Mislav Marohnić
cf92705d4c pr create: default to "Submit as draft" when --draft was used 2022-05-10 17:09:40 +02:00
Konstantin Keller
dea446d2a8
"Submit as draft" option for pr create 2022-05-03 22:20:22 +03:00
Mislav Marohnić
5986f88565 issue comment: support quotes and arguments in EDITOR value
The `issue comment` command would perform a `filepath.Base()` on the
value of EDITOR and use the result for launching the editor, which is
undesireable for both functional and display purposes:

- For functional purposes, always shellsplit the value of GH_EDITOR or
  EDITOR before we shell out to that process;
- For display purposes, extract the basename only after shellsplitting.
2022-04-29 18:05:39 +02:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Sam Coe
db85b1d3cb
Properly handle issue and pr state options when building search queries (#5513) 2022-04-25 20:18:58 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found (#5479)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Sam Coe
6fa8e4299c
Add ability to comment on close/reopen of issues/pull requests (#5437) 2022-04-11 17:06:35 +02:00
Sam Coe
8a0c1f903c
Change issue close color from red to purple (#5436) 2022-04-11 11:50:55 +02:00
Sam Coe
31da9b1360
Replace old search utility with new search (#5366) 2022-04-06 16:44:52 +02:00
Mislav Marohnić
0f1aaae57c issue/pr comment: allow using editor in non-interactive mode
The user should be able to `gh config set prompt disabled` and still be
allowed to use `gh issue comment --editor`.
2022-02-18 18:38:55 +01:00
Mislav Marohnić
57f49d9f8a issue/pr comment: improve docs as it relates to editor 2022-02-18 18:38:44 +01:00
Sam Coe
f0b60e3530
Add non-local PR template support (#5097)
* Add non-local PR template support

* Consolidate template support functions

* Change back query name
2022-01-29 07:41:24 +00:00
Sam Coe
603502febf
Allow PR create to create PRs with numerical branch names (#5090) 2022-01-25 07:22:28 +02:00
Mislav Marohnić
44775f87c8 Add nolint directives to allow-list current lint violations 2022-01-14 19:52:52 +01:00
Mislav Marohnić
30c5ef23ee Merge remote-tracking branch 'origin' into ask-stubber 2022-01-14 17:41:08 +01:00
Mislav Marohnić
456d55ead9 Have a single Render function handle all Markdown rendering 2022-01-13 19:39:43 +01:00
Mislav Marohnić
3c443efbed Improve Survey prompt stubber for tests
Both SurveyAsk and SurveyAskOne methods now share the same sets of
stubs, making it possible to change which of these methods is used in
the implementation without breaking tests.

A new method `AskStubber.StubPrompt("<prompt>")` is added as test helper
to supersede old Stub and StubOne methods. The new helper matches on
prompt messages rather than on field names, enabling tests to be written
based on what the user would see rather than coupling to implementation
details.

The new stubber also allows verifying whether a Select or MultiSelect
was rendered with the expected set of options. Furthermore, if a stubbed
value is not present among those options, the stubber will panic instead
of continuing normally.

Stubbed Selects with an int instead of a string target receiver are now
transparently handled. The values for Select stubs are always strings in
tests, but the stubber will write an int answer if the receiver expects
one as a selected index instead of a selected string value.

Lastly, this set of changes improves test resiliency since the stubs are
now matched based on prompt message (or field name for legacy stubs
created with Stub) instead of sequentially, enabling the implementation
to reorder the prompts without breaking existing tests.
2022-01-12 23:51:21 +01:00
Carl Tablante
ad8d7bb02e
#4386 Display a user's name in metadata survey for assignees and reviewers (#4420)
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-01-12 08:52:22 +00:00
Ayush Rawal
ca25026613
Avoid showing non-open PRs on the default branch (#4285)
Co-authored-by: Andrew Hsu <xuzuan@gmail.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-20 18:46:12 +00:00
Cristian Dominguez
f2d23d8c88
Allow editing commit subject when squash-merging a PR (#3344)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-20 18:25:17 +00:00
Mislav Marohnić
db50b54513 Simplify GraphQL mutations whose response we are not interested in 2021-12-08 13:35:19 +01:00
Des Preston
886f5e0e78 Avoid race condition when updating labels
Update labels using the `addLabelsToLabelable` and
`removeLabelsFromLabelable` mutations instead of via the `updateIssue`
mutation that replaces the entire set of labels. This prevents the edit
operation from clobbering any unseen changes to the list of labels.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-08 13:29:47 +01:00
Tomohiro Nishimura
a9d397be69
Add --generate-notes flag to gh release create command. (#4467) 2021-12-08 15:20:59 +04:00
Mislav Marohnić
c8d5a6be02 Accept pull requests in issue edit argument 2021-11-23 20:39:19 +01:00
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08:00
Alan Donovan
2f7f224c9e
Merge pull request #4584 from cli/FlagErrorf
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 14:14:05 -04:00
Jose Garcia
bbea5ac95e
codespace: progress indication, logging (#4555)
* Rework logging, showing progress, and printing from `codespace` commands
* Change rendering of the general progress indicator so that it's visible on both dark and light backgrounds
* The progress indicator now "spins" faster

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-10-21 18:04:04 +02:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Mislav Marohnić
f6b33572fd
Merge pull request #4279 from SiarheiFedartsou/sf-pr-list-head-filter
Add `--head` filter to `gh pr list`
2021-10-14 20:54:56 +02:00
Sam Coe
d14715f1e3
Convert bool to string early for pr list draft flag 2021-09-20 11:29:37 -07:00
Siarhei Fedartsou
6a34f53c6c Change pr list --draft UX 2021-09-17 22:05:47 +03:00
Siarhei Fedartsou
11466fda12 Add --draft and --non-draft filters to gh pr list 2021-09-12 20:48:23 +03:00
Siarhei Fedartsou
8f581fa450 Extend test for params.go 2021-09-05 21:25:48 +03:00
Siarhei Fedartsou
a133e9d9a7 Add --head filter to gh pr list 2021-09-05 21:13:16 +03:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
e1b5f78df3 💅 grammar in comment 2021-06-10 14:09:43 +02:00
Mislav Marohnić
606deaf134 Allow setting empty body via editor in issue/pr create 2021-06-04 21:50:51 +02:00