Commit graph

50 commits

Author SHA1 Message Date
Brian DeHamer
b7cea1d935
test fixup
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-10-22 08:56:13 -07:00
Eugene
5ae174b6b3
Merge pull request #11511 from cli/eugene/trusted_root_flag_for_release_verify
Hidden trusted root flag for release verify
2025-08-15 16:58:19 -04:00
ejahnGithub
79888378d8 Hidden trusted root flag for release verify 2025-08-14 14:00:55 -04:00
ejahnGithub
c4d14044c7 udpate the test 2025-08-13 14:42:50 -04:00
ejahnGithub
2d9cf84690 replace /git/refs/tags/ to /git/ref/tags/ 2025-08-13 11:23:06 -04:00
ejahnGithub
ec086af25c add test for FetchRefSHA 2025-08-08 17:32:30 -04:00
ejahnGithub
1beb8252a7 fix error for ErrReleaseNotFound when fetching ref 2025-08-04 20:58:45 -04:00
Eugene
806ae030ce
Merge pull request #11261 from cli/attester/tenancy-aware-for-san 2025-07-17 17:17:31 -04:00
Brian DeHamer
c335c5e25f
include immutable field in release view
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-07-10 11:46:09 -07:00
ejahnGithub
d068696c4d add tenancy aware for san matcher 2025-07-09 15:55:41 -04:00
Brian DeHamer
53cae592f6
refactor to simplify implementation
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-06-05 10:35:21 -07:00
ejahnGithub
d7d9228609 use standardize color roles logic for the logging 2025-05-30 14:08:59 -07:00
ejahnGithub
5048d586dc moved to shared lib 2025-05-30 13:46:54 -07:00
ejahnGithub
bf4b793eff moved to shared lib 2025-05-30 13:43:07 -07:00
ejahnGithub
df87b15598 clean the code 2025-05-30 12:53:19 -07:00
Eugene
15b7692f1a
Merge branch 'trunk' into eugene/release-verify 2025-05-30 08:20:42 -07:00
ejahnGithub
71c2361dfc add unit test 2025-05-30 08:17:21 -07:00
Brian DeHamer
bc93b54137
add Digest to ReleaseAsset struct
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-05-27 12:47:16 -07:00
ejahnGithub
d0da9b1664 update Sprintf 2025-05-23 16:23:41 -04:00
ejahnGithub
3108d99208 added the unit test 2025-05-23 15:31:33 -04:00
ejahnGithub
3a6e42f73f init 2025-05-15 17:21:13 -04:00
Tyler McGoffin
0bb92c5980
Separate partitioning from globbing in cmdutil/args package and consumers (#3)
* Separate partitioning from globbing in cmdutil/args package and consumers

In the previous commit, GlobPaths was overloaded, containing logic
specific to command use-cases. This commit removes that functionality from
GlobPaths and back into the commands that have the special use-cases.

To do this, I've introduced a new Partition util in cmdutil/args.go that
will separate a slice into two slices given a predicate. This functionality
is leveraged by both the special use-cases described above to separate the
command-specific syntax from the globable filepaths.

* Add test to validate that the order of '-' in gh gist create args doesn't matter
2025-03-04 07:05:23 +05:00
Azeem Sajid
db3df04068
Merge branch 'trunk' into 5099-gh-release-create-upload-expand-glob-patterns-on-windows 2025-02-27 19:20:44 +05:00
Azeem Sajid
f4b65b785e Add exclude callback function 2025-02-26 12:46:56 +05:00
Azeem Sajid
092eb7e962 Support globbing for all platforms 2025-02-22 12:16:42 +05:00
Tyler McGoffin
8748bb0b1a
Add testing to GlobWindowsPaths (#2) 2025-02-21 22:33:19 +05:00
Azeem Sajid
d9bfa606cc Fix gh gist create for multiple filenames and glob patterns 2025-02-11 12:56:32 +05:00
Azeem Sajid
161ad92b20 [gh release create/upload] Expand glob patterns on Windows 2025-02-09 21:58:15 +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
William Martin
c13d161271 Export databaseId for releases 2024-07-23 13:41:56 +02:00
William Martin
99ff84bdd9 Alphabetise release json fields 2024-07-23 13:41:56 +02:00
Raj Hawaldar
0d8c34bf59
Add --verify-tag to release edit command (#7646) 2023-07-07 14:23:39 +00:00
Sam Coe
35a24caed2
Standardize retry mechanism (#7027) 2023-03-02 23:06:30 +00: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ć
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
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
Mislav Marohnić
83a08aa3ba Remove unnecessary pointers to Go maps 2021-10-25 17:20:12 +02:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
c667a0bc49 Fix fetching draft releases from GitHub Actions
When using GITHUB_TOKEN in Actions, the permissions on a repository are
null and therefore we can't check whether the viewer has push access or
not. The solution is to unconditionally check for draft releases instead
of trying to be smart about it. Draft releases are going to be on top,
so we don't have to paginate through all releases in a repository.
2021-05-18 19:44:29 +02:00
Mislav Marohnić
4425365004 Add release view --json support 2021-05-18 19:40:28 +02:00
Mislav Marohnić
40da8f9c69 Allow retrying HTTP/2 uploads for release assets
The `Request.GetBody` func allows the retry mechanism to reopen the file
that's being uploaded as the request body in case the body of the
previous request has already started to be read.

Hopefully fixes the error:

    http2: Transport: cannot retry err [stream error: stream ID 1; REFUSED_STREAM]
    after Request.Body was written; define Request.GetBody to avoid this error

Ref. d523dce5a7/http2/transport.go (L554)
2021-03-17 15:55:22 +01:00
Morten Linderud
c9b9478b5c
shared/upload: Add .tar format
Currently the mimecap package is an requirement to pass the test suite,
as we need /etc/mime.types to recognize the tar extension. A better idea
is to inline all of the basic test cases for the test suite.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-09-17 17:55:25 +02:00
Mislav Marohnić
1ad9b0b14e Have FindDraftRelease be truer to its name 2020-09-03 15:35:07 +02:00
Mislav Marohnić
151a7340a6 Fix .zip and .js overrides for Windows 2020-09-03 11:44:54 +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ć
d0d9cc2f9b View latest release if no tag provided 2020-09-01 14:16:59 +02:00
Mislav Marohnić
d43d5e0bc9 Add release delete 2020-08-28 17:41:00 +02:00
Mislav Marohnić
a00d927970 Add release download, upload files on create, upload retrying 2020-08-21 18:00:52 +02:00