-
Notifications
You must be signed in to change notification settings - Fork 0
fix: set version #3
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
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 attempts to simplify authentication by removing the access_token input parameter and replacing a custom bash function that uses curl with the GitHub CLI (gh) for fetching the latest release version.
Changes:
- Removed
access_tokenrequired input parameter - Replaced custom
get_latest_version()bash function withgh release viewcommand - Simplified the version fetching logic by using GitHub CLI instead of curl
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -11,9 +11,6 @@ inputs: | |||
| description: 'version to install cli' | |||
| default: 'latest' | |||
| required: false | |||
Copilot
AI
Jan 13, 2026
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.
The access_token input has been removed from the inputs section, but it is still being referenced in line 36 of the action. This will cause the action to fail when it tries to authenticate with gh CLI using an undefined variable. The reference at line 36 needs to be updated to use an alternative authentication method or the access_token input should be retained.
| required: false | |
| required: false | |
| access_token: | |
| description: 'GitHub access token used for gh authentication' | |
| required: true |
| description: 'version to install cli' | ||
| default: 'latest' | ||
| required: false |
Copilot
AI
Jan 13, 2026
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.
Removing the required access_token input is a breaking API change that will break existing consumers of this action. All workflows using this action will need to be updated to remove the access_token parameter. Additionally, this change needs to address authentication for both the gh release view command (line 23) and the gh auth login command (line 36, which still references the removed input). Consider whether authentication is needed for accessing public releases, or if the GITHUB_TOKEN environment variable should be used instead.
|
|
||
| if [[ "${{ inputs.version }}" == "latest" ]]; then | ||
| version=$(get_latest_version) | ||
| version=$(gh release view --repo Drafteame/draft --json tagName -q .tagName) |
Copilot
AI
Jan 13, 2026
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.
The gh CLI command may require authentication to fetch release information from the repository. When the access_token input is removed, ensure that the gh CLI can access the repository either because it's public or by using the default GITHUB_TOKEN that's available in GitHub Actions. If authentication is required, the gh CLI will need to be authenticated before this command is executed.
No description provided.