-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Fix no tagname logic for release verify-asset #11798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
631a069
to
cb465a0
Compare
cb465a0
to
4fb9b29
Compare
Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes the tagName logic in the release verify-asset functionality by ensuring the correct variable is used throughout the verification process. When no tag name is provided, the system fetches the latest release tag, but the original code inconsistently used opts.TagName
instead of the resolved tagName
variable.
- Replace
opts.TagName
withtagName
variable in filtering and output operations - Add comprehensive test coverage for the no-tag-argument scenario
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/cmd/release/verify-asset/verify_asset.go | Fix variable references to use resolved tagName instead of opts.TagName |
pkg/cmd/release/verify-asset/verify_asset_test.go | Add test case for successful verification when no tag argument is provided |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [cli/cli](https://github.com/cli/cli) | minor | `v2.80.0` -> `v2.81.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>cli/cli (cli/cli)</summary> ### [`v2.81.0`](https://github.com/cli/cli/releases/tag/v2.81.0): GitHub CLI 2.81.0 [Compare Source](cli/cli@v2.80.0...v2.81.0) #### Support for GitHub Release Attestations This release introduces the `release verify` and `release verify-asset` commands for verifying GitHub Release attestations. Part of the Immutable Releases initiative, a release attestation provides a signed, timestamped binding between a release, its git tag, and any associated assets. These new commands provide a convenient way to verify the integrity of an immutable release against its attestation. - Verify the latest release has a valid attestation: `gh release verify` - Verify a specific release by tag: `gh release verify v1.2.3` - Verify an asset from the latest release: `gh release verify-asset my-asset.zip` - Verify a local asset file originated from a specific release: `gh release verify-asset v1.2.3 my-asset.zip` These commands help ensure that releases and their assets are authentic and havenβt been tampered with, providing an additional layer of security for your software supply chain. #### `gh auth status` Supports JSON Output This release adds support for the `--json` flag in `gh auth status`. Run `gh auth status --help` for more information and usage examples. #### What's Changed ##### β¨ Features - Add alias `co` for `pr checkout` by [@​babakks](https://github.com/babakks) in [#​11804](cli/cli#11804) - Add JSON output to `gh auth status` by [@​benjlevesque](https://github.com/benjlevesque) in [#​11544](cli/cli#11544) - `release verify` and `release verify-asset` are now visible by [@​ejahnGithub](https://github.com/ejahnGithub) in [#​11801](cli/cli#11801) ##### π Fixes - Fix no tagname logic for release verify-asset by [@​ejahnGithub](https://github.com/ejahnGithub) in [#​11798](cli/cli#11798) ##### π Docs & Chores - refactor: use strings.FieldsFuncSeq to reduce memory allocations by [@​juejinyuxitu](https://github.com/juejinyuxitu) in [#​11805](cli/cli#11805) #### New Contributors - [@​juejinyuxitu](https://github.com/juejinyuxitu) made their first contribution in [#​11805](cli/cli#11805) **Full Changelog**: <cli/cli@v2.80.0...v2.81.0> </details> --- ### Configuration π **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). π¦ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β» **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. π **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzIuNSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
This pull request fix of the
TagName
argument in the release verify-asset logic.