Commit graph

364 commits

Author SHA1 Message Date
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ć
c33eb3bee1 pr diff: support very long lines 2021-12-01 17:03:11 +01:00
Mislav Marohnić
4a6aa0e938 pr diff: respect global NO_COLOR/CLICOLOR_FORCE settings
In the absence of an explicit `--color` setting, or when `--color=auto`
is passed, the pr diff command should fall back to respecting the global
colorization setting as inferred from the environment.
2021-12-01 17:03:11 +01:00
Parth
c987c5711d
pr merge: pull after switching branches (#4748) 2021-11-29 18:26:35 +01:00
Parth
39bd9aafdc
pr merge: allow deleting remote branch if local branch does not exist (#4769) 2021-11-24 16:50:25 +01:00
Mislav Marohnić
c8d5a6be02 Accept pull requests in issue edit argument 2021-11-23 20:39:19 +01:00
Mislav Marohnić
f99a149eb2 Improve issue reopen re: overfetching, handling PRs
- `issue reopen` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue reopen` now accepts either issue or pull number as argument.
2021-11-23 19:39:40 +01:00
Mislav Marohnić
07cad386a5 Improve issue close re: overfetching, handling PRs
- `issue close` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue close` now accepts either issue or pull number as argument.
2021-11-23 19:38:55 +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
stdtom
9468e9e7df
Fix copy/paste mistake in docs 2021-10-21 12:34:20 +02: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
Mislav Marohnić
e4c8aa3b2b Add tests for pr diff --patch 2021-10-08 13:53:19 +02:00
Adarsh K Kumar
e0897fd8e8 #2720 | Add patch flag to pull-request diff command 2021-10-07 23:09:21 +05:30
Mislav Marohnić
c4ec0a65ba
Merge pull request #4363 from RasmusWL/patch-1
Also set `pushRemote` on `gh pr checkout` from fork
2021-09-30 12:01:47 +02:00
Nate Smith
425bc64859
Merge pull request #4090 from bchadwic/pr-checks
Revised pending and skipped symbols for pr checks / run commands
2021-09-27 09:25:21 -07:00
Reto Hablützel
f6e9734f17 add more hints to docs 2021-09-25 08:38:26 +02:00
Rasmus Wriedt Larsen
9e3893e104 Also set pushRemote on gh pr checkout from fork
As explained in https://git-scm.com/docs/git-config#Documentation/git-config.txt-branchltnamegtremote
if you have `remote.pushDefault` set in your global gitconfig (like I
do), then _that_ setting will take precedence over
`branch.<name>.remote` 😞

However, `branch.<name>.pushRemote` will take precedence over your
`remote.pushDefault` setting, such that
`gh pr checkout 123 && make changes && git push` will just work, even if
you have `remote.pushDefault` set 💪
2021-09-24 16:38:25 +00:00
Sam
02ed5a9666
Merge pull request #4316 from SiarheiFedartsou/sf-pulls-draft
Add `--draft` and `--non-draft` filters to `gh pr list`
2021-09-20 12:07:52 -07: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
1926971a76 Remove non-relevant test 2021-09-12 21:04:03 +03:00
Siarhei Fedartsou
f3053c3628 fix tests 2021-09-12 20:58:13 +03:00
Siarhei Fedartsou
373d1efb58 format code 2021-09-12 20:50:21 +03:00
Siarhei Fedartsou
11466fda12 Add --draft and --non-draft filters to gh pr list 2021-09-12 20:48:23 +03:00
Mislav Marohnić
619333adb6 Avoid using error values to pass information about the search cap 2021-09-06 16:09:18 +02:00
Des Preston
e8b015b80d show warning when limit exceeds search api max
Fixes #3839
2021-09-06 16:05:11 +02: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ć
e0fa56dc29 Merge remote-tracking branch 'origin' into go-module-v2 2021-09-02 20:02:16 +02:00
Luke
1102de89be add quotes around @me in documentation to ensure examples work on powershell 2021-08-30 09:13:43 -05:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Heath Stewart
e2973453b5
Add helper template functions for rendering tables (#3519)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 21:00:25 +02:00
Mislav Marohnić
9a485ddfa2 💅 Cleanup local branch handling during pr checkout 2021-08-05 20:44:34 +02:00
Des Preston
294a029e70 add --branch flag to pr checkout
Allows renaming the checked out branch.
2021-08-05 20:44:20 +02:00
bchadwic
1f2ab7fbe4 pr and run check symbols revision 2021-08-05 02:13:55 -07:00
Mislav Marohnić
5d1d967c43 💅 Clean up pr merge admin logic 2021-08-03 15:49:55 +02:00
rsteube
baa18c164d pr merge: added --admin flag 2021-08-02 13:02:32 +02:00
Mislav Marohnić
db8204dc56 Allow space to be added after completing issue/pr list --state values
The "nospace" directive instructs the shell completion logic to avoid
adding a space after completing the word. However, this feature was
broken in an older Cobra, and users still saw a space character added.
In most case we want the space because we anticipate that the user might
want to add extra arguments to the command.
2021-07-21 16:12:38 +02:00
Mislav Marohnić
a83c2924c5 Never prompt to delete branch if --auto was given 2021-07-20 19:49:19 +02:00
Mislav Marohnić
6e026412df Add "UNSTABLE" to immediately mergeable statuses
This status describes a state where the head branch is mergeable and
technically not blocked per base branch requirements, but it does have
non-passing checks.
2021-07-20 19:42:53 +02:00
Mislav Marohnić
6f2dfd7eea Adjust conditions for switching between regular and auto merge
Conditions prohibiting a regular merge: BLOCKED, BEHIND, DIRTY.

Conditions triggering a regular merge even if `--auto` was set: CLEAN,
HAS_HOOKS.

Note that UNKNOWN status does not trigger either of the conditions.
2021-07-20 19:34:32 +02:00
Mislav Marohnić
0ab9c70c3f Merge remote-tracking branch 'origin' into improve-automerge 2021-07-20 18:45:47 +02:00
Cristian Dominguez
bec0a102c5 Fix tests 2021-07-05 12:47:48 -03:00
Cristian Dominguez
bcab8c0766 Only merge PRs if branch checks have passed 2021-07-05 12:46:36 -03:00
bchadwic
47314a6bbc modified HexToRGB to check whether terminal and gh have color enabled, as well as created tests for HexToRGB 2021-07-03 17:09:25 -07:00