-
Notifications
You must be signed in to change notification settings - Fork 104
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
(GH-1113) (GH-917) Fix forge-token handling #1121
(GH-1113) (GH-917) Fix forge-token handling #1121
Conversation
forge-token
in release cmd
Codecov Report
@@ Coverage Diff @@
## main #1121 +/- ##
==========================================
- Coverage 91.25% 91.24% -0.02%
==========================================
Files 137 137
Lines 5570 5571 +1
==========================================
Hits 5083 5083
- Misses 487 488 +1
Continue to review full report at Codecov.
|
|
Prior to this fix, the `forge-token` option defined in the PDK::CLI's `release` subcommand did not have the `argument:` attribute set. This meant that the underlying Cri lib treated it as a boolean option and the forge token value was set to `true` and passed to the `PDK::Module::Release` object. This fix sets the `argument:` attribute with the value `:optional`, which allows it to be optional but treated as an arg that needs the value extracted after `=`
Prior to this commit, when running `pdk release` and stepping through the interview questions, even if you selected `N` to the publish forge question, a warning would still display stating: ```sh pdk (ERROR): Missing forge-token option ``` This commit sets the `:skip_publish` option to true in `opts` that gets passed to the `PDK::Module::Release` object on init. This will ensure that the `skip_publish?` call returns `true` and the Forge token check is not performed. This was incorrectly asserted as resolved in `2.1.1` of the PDK.
forge-token
in release cmdforge-token
; Fix incorrect 'Missing forge-token' error throwing
forge-token
; Fix incorrect 'Missing forge-token' error throwingforge-token
; (GH-917)Fix incorrect 'Missing forge-token' error throwing
forge-token
; (GH-917)Fix incorrect 'Missing forge-token' error throwingforge-token
; (GH-917) Fix incorrect 'Missing forge-token' error throwing
forge-token
; (GH-917) Fix incorrect 'Missing forge-token' error throwingThere 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.
veriried locally, appears to work as expected
This PR contains two fixes:
(GH-1113) Fix incorrect opt type for
forge-token
Prior to this fix, the
forge-token
option defined in the PDK::CLI'srelease
subcommand did not have theargument:
attribute set.This meant that the underlying Cri lib treated it as a boolean option
and the forge token value was set to
true
and passed to thePDK::Module::Release
object.This fix sets the
argument:
attribute with the value:required
,which emulates the way it is set in the
publish
subcommand.Closes: #1113
(GH-917) Fix incorrect 'Missing forge-token' error throwing
Prior to this fix, the
forge-token
option defined in the PDK::CLI'srelease
subcommand did not have theargument:
attribute set.This meant that the underlying Cri lib treated it as a boolean option
and the forge token value was set to
true
and passed to thePDK::Module::Release
object.This fix sets the
argument:
attribute with the value:optional
,which allows it to be optional but treated as an arg that needs the
value extracted after
=
Resolves: #917