Commit graph

151 commits

Author SHA1 Message Date
Roman Podoliaka
0d84970bbb
Fix the description of gh release upload
The formatting verb is used incorrectly and produces a misleading
help text for this command:

```
To define a display label for an asset, append text starting with %#% after the file name.
```

instead of the expected:

```
To define a display label for an asset, append text starting with `#` after the file name.
```
2024-03-18 11:19:20 +00:00
Zack Sloane
f70bcba779 switch to [] characters for default info in usage strings 2024-02-01 21:35:31 +00:00
Zack Sloane
15166f485a
Merge branch 'cli:trunk' into trunk 2024-02-01 16:27:12 -05:00
victor
3db1bee20d fixed linting 2024-01-26 16:12:55 -05:00
victor
5cea8aa74d fixed linting 2024-01-26 16:10:48 -05:00
victor
795213319e added Order flag for release list command 2024-01-26 15:47:08 -05:00
Zack Sloane
3339e62666
Merge branch 'cli:trunk' into trunk 2024-01-24 12:42:25 -05:00
William Martin
89b5dbc2b7
Merge pull request #8589 from fpistm/typo_fix
Fix some typos raised by codespell
2024-01-18 12:42:05 +01:00
Victor Martinez
b62e977c91
Add --json export flags to release list command (#8474) 2024-01-17 10:51:01 -08:00
Frederic Pillon
55d251ac51 Fix some typos raised by codespell
With .codespellignore containing:
aline
commitish
messag
noes
nwo
parth
prfiles
runn
timere
ue
welp

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
2024-01-17 15:34:49 +01:00
Zack Sloane
1b58b7d7f1
Merge branch 'trunk' into trunk 2024-01-11 09:51:22 -05:00
Sam Coe
785a340f78
Prevent downloading releases with assets that match windows reserved filenames (#8517)
* Prevent downloading releases with assets that match windows reserved filenames

* Add comment noting potential use of build constraints in the future
2024-01-09 09:53:57 -08:00
Zack Sloane
b6dadfa7fb test update, more consistent default value display 2024-01-08 23:23:24 -05:00
Andy Feller
b77de0d458 Additional formatting changes
- gh help actions
  - highlight 3 commands to run for more information
- gh extension
  - wrapping url for online linking
  - fix install subcommand missing backtick formatting
- gh release create
  - fixing mixed indenting causing usage misalignment
- root help
  - backtick wrap help command for more info for consistency
- gh help environment
  - backtick wrap missed OWNER/REPO
- gh variable
  - brought consistency to output when deleting or setting variable
2023-12-01 09:08:51 -05:00
Yukai Chou
afbdb945bc Small docs tweaks 2023-11-23 07:14:38 +08:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Yukai Chou
ccf45cc7c6
Improve gh release download doc (#8294)
* Improve `gh release download` doc

When downloading latest release assets,
`gh release download --archive=(zip|tar.gz)` works too.

Sync doc with no-arguments warning.

* Apply suggestion from code review

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>

---------

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2023-11-06 07:59:03 +00: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
Heath Stewart
7738b6187c
Add headers to all tables (#8157) 2023-10-20 11:20:02 +02: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
9f68a49304
Merge branch 'cli:trunk' into git-tag-release-notes 2023-09-07 17:31:20 -04:00
Keming
ba60f89f42
Delete local tag when running gh release delete --cleanup-tag (#7884) 2023-09-07 12:04:15 +00:00
Keith Bailey
f43861201d
Merge branch 'trunk' into git-tag-release-notes 2023-08-18 00:18:28 -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
Sam Coe
e0d2fc8eaa
Use filepath.Base to sanitize path for archive downloads (#7805) 2023-08-07 07:35:47 -07:00
Harvey Sanders
f777bec798
release create: Trim spaces on interactive tag name input (#7759) 2023-07-27 09:18:51 -07:00
Sam Coe
7f3196fcd4
Use filepath.Clean to sanitize path for archive downloads (#7720) 2023-07-18 12:49:55 -07:00
Raj Hawaldar
0d8c34bf59
Add --verify-tag to release edit command (#7646) 2023-07-07 14:23:39 +00:00
Tommy Petty
e9ff00bd01 Updated to sanitize asset filename prior to uploading. Fixes #7024 2023-05-22 15:29:48 -04:00
Josh Kraft
b01c27aba2
Add progress labels for gh release download (#7380) 2023-05-07 21:28:37 +00:00
Benjamin Chadwick
82662685e3
Autocomplete branch flags (#6031)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-03-29 16:09:44 +00:00
Sam Coe
39805fa9b1
Properly handle closing files that have been writen to (#7199) 2023-03-23 01:17:47 +00: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
Sam Coe
35a24caed2
Standardize retry mechanism (#7027) 2023-03-02 23:06:30 +00:00
Kevin Lee
9a1056fc87
Add search commits command (#6817) 2023-01-17 19:35:09 +00:00
Mislav Marohnić
f8f206e063
Group PR, release, and repo subcommands 2022-12-21 14:47:59 +01:00
Mislav Marohnić
a55dd656f3
Merge remote-tracking branch 'origin' into cobra-update 2022-12-20 17:15:25 +01: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
Mislav Marohnić
36ffbe18de
Improve looking up draft releases by tag name
This changes the FetchRelease implementation to look up draft releases directly using by its pending tag name, as opposed to resorting to the Releases list API which is backed by Elastic Search and thus suffers replication lag after the creation of a draft release.

Bonus: all release lookup functions now accept a context for cancellation.
2022-12-14 21:24:08 +01:00
Mislav Marohnić
dd8c5c9dae
Fix clobbering old files in release download (#6694)
Ensures that the old file to be clobbered is first truncated before writing.
2022-12-13 18:39:23 +00:00
vilmibm
6507d35f2f port release command to prompter 2022-12-09 15:06:26 -08:00
Owen Voke
57f5bd8cdd
Add support to exclude pre-releases from release list (#6625) 2022-12-08 08:53:12 +02: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ć
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01:00