Commit graph

130 commits

Author SHA1 Message Date
Federico Guerinoni
c6a693c459
Add --template flag for issue create and pr create (#7185)
Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
Co-authored-by: Alessio Cosenza <cosenzaalessio17@gmail.com>
2023-03-27 08:24:12 +00:00
Sam Coe
35a24caed2
Standardize retry mechanism (#7027) 2023-03-02 23:06:30 +00:00
Sam Coe
08a1231178
Allow retrieving projectItems in JSON and allow adding/removing user owned projects (#7007) 2023-02-15 22:14:59 +00:00
Mislav Marohnić
14eb873b9e
Avoid implicitly fetching when adding a new git remote (#6990) 2023-02-07 21:22:02 +00:00
Josh Soref
e6d6427704 Support Fork with Default Branch Only 2023-02-07 10:00:39 -05:00
Benjamin Levesque
fef4195004
Add --reviewer flag completion (#6873)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-01-25 18:02:13 +01:00
Sam Coe
63ad804a26
Add notes about project scope to various commands (#6907) 2023-01-24 17:22:20 +00:00
Ilya Yatsishin
179e9c256d
Add projectsV2 support to issue create, issue edit, pr create, and pr edit (#6735)
Co-authored-by: pshevche <pavel.shevchenko.95@gmail.com>
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2023-01-19 22:13:09 +00:00
vilmibm
f5d19b831e error instead of prompt when no base repo + fixes 2022-12-15 11:44:37 -08:00
vilmibm
91445d2df3 Merge remote-tracking branch 'origin/trunk' into pr-prompter 2022-12-05 11:27:55 -08:00
Sam Coe
98ab1f2587
Authenticate network git commands (#6541) 2022-11-15 13:14:37 +02:00
Sam Coe
f96b2fce57
Refactor git client and add tests (#6525) 2022-11-03 11:58:38 +01:00
Mislav Marohnić
8c32ca925c
Enable gh pr create --repo <repo> from outside of a local git repository
When failing to read information from the local git repository, silence that failure if `--repo` was given.
2022-10-28 18:22:37 +02:00
Mislav Marohnić
5d3a8e380a
Fix double import 2022-10-28 17:58:04 +02:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 (#6474) 2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"

This reverts commit 57fbe4f317.

* Fix pr create regression
2022-10-20 12:46:23 +03:00
vilmibm
47eebe0c64 use Prompter in template manager 2022-10-19 13:05:00 -07:00
vilmibm
a3b1bb7fb2 use Prompter in pr create
Note that this isn't done; it's leaving the metadata piece alone until
better testing utils are in place
2022-10-19 13:05:00 -07:00
Sam Coe
57fbe4f317
Refactor to use new git client (#6447) 2022-10-19 21:11:36 +03:00
Nate Smith
666470744d
Merge pull request #6313 from cli/context-prompter
use Prompter in context
2022-09-21 19:28:54 -05:00
Mislav Marohnić
6ca9406554 pr create: allow git push step to prompt on stdin 2022-09-21 20:57:53 +02:00
vilmibm
7b21a3ea45 use Prompter in context 2022-09-21 11:33:28 -07:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages (#6084) 2022-08-18 09:04:13 +03:00
vilmibm
6bc89ebbc2 Merge remote-tracking branch 'origin/trunk' into prompt-factory 2022-08-15 16:24:28 -05:00
vilmibm
5f41801813 modernize the tests for pr create 2022-08-10 15:04:11 -05:00
vilmibm
dfd6908cd0 refactor determineTrackingBranch tests 2022-08-10 15:03:45 -05: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
Mislav Marohnić
5656296ade repo fork: directly fork under the desired name
A new GitHub feature landed where the API client can specify the desired
name of the new fork. This avoids the necessity of subsequently having
to rename the forked repo after the fork operation has created one.

For backwards compatibility, the renaming logic is still here, but
activates only if the resulting repo name is not the desired name.
2022-07-11 13:54:58 +02:00
Mislav Marohnić
f184d7ec58 pr create: allow forking repositories with INTERNAL visibility
The IsPrivate field of "internal" repositories is always true, but those
repositories aren't truly private and absolutely can be forked. We
shouldn't be checking for platform permissions in the client anyway, so
let's just drop this check and have the platform decide whether this is
a valid operation.
2022-06-07 17:56:06 +02:00
Mislav Marohnić
2139e763fb Write Cobra deprecation messages to stderr
We used to do the equivalent of `rootCmd.SetOut(os.Stdout)` because we
thought that Cobra's "Out" stream represents standard output. However,
upon closer inspection it turns out that this is Cobra's stream for
usage errors and deprecation warnings, and those we want written to
stderr as well. It is not clear to me why Cobra maintains a distinction
between "Out" and "Err" streams since both seem to go to sdterr by
default.

This change also ceases our usage of `command.Print()` functions in
favor of explicitly writing to `IOStreams.Out/ErrOut`.
2022-05-23 20:23:42 +02:00
Mislav Marohnić
4d9a6ecb25 pr create: ensure clear error when --body is missing in nonTTY mode 2022-05-18 19:13:59 +02: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
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Luke Karrys
c847e935f1
pr create --body-file can read from stdin (#5461) 2022-04-14 06:32:26 +00:00
Christopher Nethercott
933a91e18e
Add "new" alias to "create" commands (#5388)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-11 16:48:34 +02:00
Daniel Le
24ba3540b7 generateCompareURL uses url.PathEscape instead of url.QueryEscape
For ctx.{BaseBranch,HeadBranchLabel}.
2022-03-30 13:01:24 +08: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
Nate Smith
4b415f80d7
Merge pull request #5022 from cli/config-defaults
add GetOrDefault and related methods to Config
2022-01-17 10:44:28 -06:00
Mislav Marohnić
44775f87c8 Add nolint directives to allow-list current lint violations 2022-01-14 19:52:52 +01:00
Mislav Marohnić
90ec1089ef Port pr create tests to the new ask stubber 2022-01-12 23:57:19 +01:00
nate smith
562f1b3d0d add GetOrDefault functionality to config 2022-01-11 14:56:58 -06:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
606deaf134 Allow setting empty body via editor in issue/pr create 2021-06-04 21:50:51 +02:00
Mislav Marohnić
bc3bb97c43 Merge remote-tracking branch 'origin' into pr-lookup-refactor 2021-05-17 17:41:38 +02:00