Mislav Marohnić
8cb312a620
Fix release assets upload retry logic
...
Enables up to 3 retries of uploading a single asset when encountering a network error or a HTTP 5xx error.
Bonus:
- simplifies ConcurrentUpload implementation
- support Go context cancellation
2022-12-14 21:25:09 +01:00
Mislav Marohnić
cbeed671dd
release create: clean up leftover draft release on upload/publish failure
2022-12-14 21:24:39 +01:00
vilmibm
6507d35f2f
port release command to prompter
2022-12-09 15:06:26 -08:00
Luan Vieira
fad72b788d
Avoid duplicate remote tag lookups
...
Co-authored-by: Mislav Marohnić <hi@mislav.net>
2022-11-16 15:12:18 -05:00
Luan Vieira
f1a067ff18
Clarify --verify-tag flag description
...
Co-authored-by: Mislav Marohnić <hi@mislav.net>
2022-11-16 15:09:21 -05:00
Luan Vieira
11bef8c3b5
Add --verify-tag flag for release creation command
...
Fixes https://github.com/cli/cli/issues/6566
When running `gh release create <tag> --verify-tag`, we query <tag>
among repository tags via the GitHub API before creating the release,
and abort the command if the tag was not found.
2022-11-16 13:45:55 -05:00
Mislav Marohnić
6c8aaff919
Merge pull request #6538 from cli/release-make-latest
...
Support explicitly marking a Release as "Latest"
2022-11-03 11:31:10 +01:00
Mislav Marohnić
e8dc825c7c
Avoid duplicate release when creating a release with assets ( #6493 )
...
When publishing a release, we rely on server-side validation to abort the operation if an existing published release with the same tag name already exists.
However, then creating a release with assets, we first create a draft release, upload assets to it, then publish. If there was an existing release with the same tag name, the operation would fail but it would leave behind a temporary draft release with assets. This makes the operation fail earlier, before creating any records.
2022-11-01 19:03:03 +00:00
Mislav Marohnić
c63e3a094d
release create: support explicitly marking as "Latest"
2022-10-31 16:30:51 +01: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
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
Sam Coe
2944f7c3ab
Create git client ( #6354 )
2022-10-14 07:47:03 +00:00
Sam Coe
e7102f9d84
Migrate to go-gh text package ( #6236 )
2022-09-14 09:23:55 +04:00
Bindu
9fddb07eab
Add --notes-start-tag flag for generating release notes in gh release create ( #6107 )
2022-09-06 16:06:18 +04: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
casswedson
00bc550dc6
chore: typo hunting ft. codespell
2022-07-09 21:41:09 -05:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os ( #5498 )
2022-04-26 13:07:44 +02:00
Johannes Plunien
186e5ccfb2
Add release edit command ( #5422 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-13 14:51:49 +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
Mislav Marohnić
5d36bcc4de
Merge remote-tracking branch 'origin' into fix/release-discussion-category
2022-02-15 18:28:08 +01:00
Mislav Marohnić
72340076ae
tests
2022-02-15 18:27:58 +01:00
Sam Coe
28d2b52769
release create: warn about unpushed local git tag ( #5104 )
...
If `gh release create <TAG>` was called and TAG exists locally but not on the remote, this warns about the unpushed tag to avoid recreating it on the remote. The user can pass a value for `--target` to silence the warning.
2022-02-15 16:36:37 +01:00
Mislav Marohnić
df21025133
Add tests for release create from commit log, annotated tag
2022-01-17 14:23:05 +01:00
Mislav Marohnić
7090922713
💅 release create tests
2022-01-17 14:05:01 +01:00
Mislav Marohnić
e54b29e9cf
Merge remote-tracking branch 'origin' into bugfix/release/create/no-tag-when-generated-available
2022-01-17 13:27:47 +01:00
Mislav Marohnić
44775f87c8
Add nolint directives to allow-list current lint violations
2022-01-14 19:52:52 +01:00
Mislav Marohnić
ff072574f9
Port release create tests to the new ask stubber
2022-01-12 23:57:19 +01:00
keijun-kumagai
6bc0b69355
feat(http): supress linter
2022-01-13 00:33:07 +09:00
Spenser Black
e8dfa9e728
Fix tag message option hidden
...
This fixes the option in `gh release create` to generate release notes
from the tag message being hidden whenever generated notes are
available. This changes the behavior from hiding "generate from tag" and
"generate from commit log" being hidden to *only* the "generate from
commit log" option being hidden.
Fixes #5027
2022-01-12 09:36:29 -05:00
keijun-kumagai
015b9f7fea
fix(release): discussion category with assets
2022-01-11 01:49:19 +09:00
Sergio Guzmán Mayorga
43ae0e5f87
Add interactive tag selector to create release ( #4525 )
2021-12-08 16:20:15 +04:00
Tomohiro Nishimura
a9d397be69
Add --generate-notes flag to gh release create command. ( #4467 )
2021-12-08 15:20:59 +04:00
Sam Coe
2135918c47
Turn survey options into variables so they can't accidentally become unsynced with default value
2021-10-19 08:55:30 -07:00
Tomohiro Nishimura
c7f79e8447
Set default publish action to draft if --draft option is set
2021-10-19 22:37:46 +09:00
Reto Hablützel
f6e9734f17
add more hints to docs
2021-09-25 08:38:26 +02:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00
Des Preston
bdc5b55f55
pr comments
...
Only add discussion category to request if there is one. This eliminates
the need to update old tests.
Renaming the variable to something shorter.
2021-08-10 09:47:49 -04:00
Des Preston
45a4257612
add --discussion-category flag to release cmd
...
Flag for signaling that a discussion should be created with the given
category for the release. Discussions are not supported for draft
releases. If a discussion category is given for a draft, an err will be
shown.
Closes #3381
2021-07-15 10:07:21 -04:00
Mislav Marohnić
4425365004
Add release view --json support
2021-05-18 19:40:28 +02:00
vilmibm
47ed41bfcd
add some more examples for release create
2021-04-22 15:26:26 -05:00
Mislav Marohnić
e96d974331
Merge pull request #3023 from cli/cancel-error-status
...
Issue/pr create: exit with nonzero status code when "Cancel" was chosen
2021-03-04 13:45:11 +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ć
fee7adf9ba
Add issue create -F <file> flag and tests
2021-02-23 14:25:32 +01:00
Mislav Marohnić
9dcf47d5d1
release create: clarify handling of git tags
2021-02-03 22:33:37 +01:00
Mislav Marohnić
5b4a08dcb9
Ensure that only PATH is searched when shelling out to external commands
...
Works around https://github.com/golang/go/issues/38736 for Windows.
2020-11-11 16:33:13 +01:00
Alisson Santos
cf617e88f4
Extract repeated code to util function
2020-11-03 22:05:04 +01:00