Victor Martinez
c0658b7ab4
feat: support dry-run in gh pr create ( #8376 )
2024-03-14 16:28:53 +01:00
William Martin
2ee6737053
Use regex to split apart the git client Commit logs
...
Theoretically this should be clearer and more robust than the previous
version which had some custom loop logic while trying to parse newlines
and determine whether it had reached a new commit entry by trying to parse
a git sha. This would not have worked correctly if a commit body contained
a sha on a new line.
2024-02-27 20:49:00 +01:00
William Martin
2b0484f5aa
Use null byte separators when fetching comments from git
2024-02-27 18:00:40 +01:00
William Martin
14617e59e9
Update test to run against trunk
2024-02-16 16:30:00 +01:00
William Martin
237f6e3435
Test PR create uses commit title and body when only one commit
2024-02-16 16:19:02 +01:00
Federico Guerinoni
3409d068d4
Make commit title in bold
2024-02-01 09:12:06 +01:00
Federico Guerinoni
42613172bd
pr: Add flag fillverbose
...
This is used to fill the body of PR with all commits msg + body
of every commits because there can be lot of useful information.
Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2024-02-01 09:12:04 +01:00
Arun
e623f70a47
Specify refspec to push to the correct branch in the event of a conflicting tag
2024-01-24 11:14:35 -08:00
Sam Coe
1b79e95311
Clean up style nits and simplify some logic
2023-07-11 13:34:22 +09:00
Nate Smith
4c918e90a6
Merge pull request #7398 from kousikmitra/feature/pr-fill-first
...
Feature: Add `fill-first` flag to `pr create` command
2023-07-10 16:20:15 -07:00
leavesster
d871da679b
Change how remotes are treated during pr create when repo is forked ( #7330 )
2023-06-28 04:07:42 +00:00
Kousik Mitra
38e6287fe8
Fix commit order
2023-06-23 17:47:03 +05:30
Kousik Mitra
1b9906268f
Add test for fill first flag
2023-06-23 17:47:03 +05:30
Kousik Mitra
a7fdc37b5d
Add fill-first option to create pr
...
This will add an flag --fill-first to pr create sub-command.
Which will allow users to create pr with details from first commit.
2023-06-23 17:47:03 +05:30
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
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
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
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
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
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages ( #6084 )
2022-08-18 09:04:13 +03: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
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
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
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
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
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
Mislav Marohnić
c50d390cf5
Fix tests
2021-05-07 22:09:58 +02:00
Cristian Dominguez
2f94adabb2
Use T.TempDir for temporary dirs in tests ( #3580 )
2021-05-07 12:21:26 +02:00
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ć
111e8dbcf2
Pass web browser to each individual command
...
This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
2021-03-19 21:22:37 +01:00
Mislav Marohnić
fee7adf9ba
Add issue create -F <file> flag and tests
2021-02-23 14:25:32 +01:00
Mislav Marohnić
83bb1bfd9d
Port pr create to new templates implementation
2021-02-10 18:20:57 +01:00
Mislav Marohnić
47baf8fb10
pr create: explain how to link an issue
2021-02-03 22:17:31 +01:00