William Martin
49ed6c4681
Use t.Chdir in tests
2025-06-17 11:44:14 +02:00
Art Leo
89bed45c55
Release download handles missing archive URLs
...
Co-authored-by: William Martin <williammartin@github.com>
2025-05-08 12:41:12 +02:00
Art Leo
d78980c668
Fix release download test http stubbing
...
Co-authored-by: William Martin <williammartin@github.com>
2025-05-08 12:15:28 +02:00
Azeem Sajid
33c30d5bd1
Inconsistent format of examples in help text
2025-02-27 16:26:25 +05: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
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
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
Sam Coe
e0d2fc8eaa
Use filepath.Base to sanitize path for archive downloads ( #7805 )
2023-08-07 07:35:47 -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
Josh Kraft
b01c27aba2
Add progress labels for gh release download ( #7380 )
2023-05-07 21:28:37 +00:00
Sam Coe
39805fa9b1
Properly handle closing files that have been writen to ( #7199 )
2023-03-23 01:17:47 +00: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
Luis Filipe Pessoa
a15c254eba
Adding output functionality ( #6410 )
...
Output flag allows one to download to a specific file location or event redirect to output using '-' as argument.
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-11-02 10:24:33 +01:00
Takeshi Sato
e2f344fef4
Add --clobber / --skip-existing to release download ( #6053 )
2022-09-01 12:28:25 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os ( #5498 )
2022-04-26 13:07:44 +02:00
Mislav Marohnić
acc1759434
Allow downloading the archive of the latest release
2021-11-30 15:52:51 +01:00
Mislav Marohnić
8e311847db
Ensure that we never download "legacy" archive formats
...
The `zipball_url` and `tarball_url` fields on the Release API payload
always link to "legacy" archives that are of a different format than
those one would get if they downloaded an archive from a Release using
the web interface. The GitHub API does not seem to publish links to
non-legacy archives.
This adds a redirect hack to turn "legacy" Codeload URLs into non-legacy
ones with the goal of ensuring the consistency of user experience when
downloading archives.
2021-11-30 15:52:51 +01:00
lpessoa
8058c4ea34
Adding gh release download for .zip and .tar.gz
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-30 15:52:51 +01: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ć
1ce61d4b80
Allow specifying multiple patterns in release download
2020-09-09 17:36:49 +02:00
Mislav Marohnić
d4b45c68e2
Allow downloading assets from the latest release
2020-09-03 15:34:10 +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
Mislav Marohnić
a00d927970
Add release download, upload files on create, upload retrying
2020-08-21 18:00:52 +02:00