Commit graph

46 commits

Author SHA1 Message Date
Azeem Sajid
960017a4f1 Rename flag to --fail-on-no-commits 2025-02-19 15:20:17 +05:00
Azeem Sajid
49fd7a5756 [gh release create] Fail when there are no new commits since the most recent release 2025-02-08 18:20:43 +05:00
bagtoad
deb34d6456 Refactor error handling for missing "workflow" scope in createRelease 2024-11-23 16:59:49 -07:00
bagtoad
68f3ef79ca Handle missing "workflow" scope in createRelease 2024-11-16 19:32:37 -07:00
Babak K. Shandiz
668dbcefc6
Add test cases for PGP, SSH and X.509 signatures
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:50:31 +01:00
Babak K. Shandiz
8ea1b8973a
Update tests with changes to gitTagInfo function
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-30 00:21:19 +01:00
Babak K. Shandiz
df3b0627fd
Add test for gitTagInfo
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:26:03 +01:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Arun Sathiya
5eff7a529a
fix(release create): Handle latest flag value when updating the release after assets are uploaded (#8207)
Signed-off-by: Arun <arun@arun.blog>
Co-authored-by: William Martin <williammartin@github.com>
2023-11-01 15:17:05 +01:00
Sam Coe
94fbbdf9b5
Cleanup release create around new --notes-from-tag flag (#8016) 2023-09-19 08:26:52 +00:00
Keith Bailey
be41a9bd20
moved remoteTagExists under if NotesFromTag exists and added three tests 2023-09-11 14:17:49 -04:00
Keith Bailey
5ccfbe9d7e
Add gh release create [<tag>] --notes-from-tag
Generates release notes from an annotated git tag noninteractively.
Fixes #6718
2023-08-17 23:17:29 -04:00
Harvey Sanders
f777bec798
release create: Trim spaces on interactive tag name input (#7759) 2023-07-27 09:18:51 -07:00
Nate Smith
aae4023cdc use t.Cleanup(m.Verify) 2023-03-09 16:43:48 -08:00
vilmibm
b5c3d982b1 new tooling for assertions about prompting 2023-03-09 16:40:27 -08:00
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
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
Bindu
9fddb07eab
Add --notes-start-tag flag for generating release notes in gh release create (#6107) 2022-09-06 16:06:18 +04: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
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +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ć
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
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
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
Alisson Santos
7a106e2ded improve error message 2020-11-03 18:46:07 +01:00
Mislav Marohnić
a470d49c64 Fix reporting release URL when creating with assets 2020-09-03 16:06:28 +02:00
Mislav Marohnić
02a057a709 Try fixing Windows tests 2020-09-02 22:11:46 +02:00
Mislav Marohnić
0f42c7af4d Add tests for release create, delete, download, view 2020-09-01 18:56:30 +02:00