Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: use core.getBooleanInput() to retrieve boolean input values #223

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

Merged

Conversation

Yang-33
Copy link
Contributor

@Yang-33 Yang-33 commented Mar 29, 2025

This PR switches from evaluating values passed to skip-token-revoke as true if they are truthy in JavaScript, to using getBooleanInput. This change ensures that only proper YAML boolean values are recognized, preventing unintended evaluations to true.

The documentation states, "If truthy, the token will not be revoked when the current job is complete", so this change could be considered a breaking change. This means that if there are users who rely on truthy and expect values like whitespace or "false" to be evaluated as true (though this is likely rare), it would be a breaking change.

  • Boolean(" ") and Boolean("false") are both evaluated as true.

Alternatively, it can simply be considered a fix. How to handle this is up to the maintainer.

Resolve #216

@Yang-33 Yang-33 requested a review from a team as a code owner March 29, 2025 14:07
@Yang-33 Yang-33 marked this pull request as draft March 29, 2025 14:09
@Yang-33 Yang-33 closed this Mar 29, 2025
@Yang-33 Yang-33 reopened this Mar 29, 2025
@Yang-33 Yang-33 marked this pull request as ready for review March 29, 2025 15:11
main.js Outdated Show resolved Hide resolved
@Yang-33
Copy link
Contributor Author

Yang-33 commented Apr 4, 2025

@parkerbxyz PTAL~

tests/post-revoke-token-fail-response.test.js Show resolved Hide resolved
@gr2m
Copy link
Contributor

gr2m commented Apr 25, 2025

We checked if the more strict interpretation of true/false will cause friction for existing users but at least for open source repositories everyone seems to set the input to either true or false:
https://github.com/search?q=path%3A.github%2Fworkflows+actions%2Fcreate-github-app-token+skip-token-revoke&type=code&p=1

We are just having a look at the tests

@parkerbxyz parkerbxyz changed the title Use core.getBooleanInput() to retrieve boolean input values fix: use core.getBooleanInput() to retrieve boolean input values Apr 25, 2025
@parkerbxyz parkerbxyz enabled auto-merge (squash) April 25, 2025 18:58
Copy link
Contributor

@parkerbxyz parkerbxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Yang-33! ✨

@parkerbxyz parkerbxyz merged commit c3c17c7 into actions:main Apr 25, 2025
2 checks passed
create-app-token-action-releaser bot pushed a commit that referenced this pull request May 1, 2025
## [2.0.3](v2.0.2...v2.0.3) (2025-05-01)

### Bug Fixes

* **README:** use `v2` in examples ([#234](#234)) ([9ba274d](9ba274d)), closes [#232](#232)
* use `core.getBooleanInput()` to retrieve boolean input values ([#223](#223)) ([c3c17c7](c3c17c7))
@create-app-token-action-releaser

🎉 This PR is included in version 2.0.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use core.getBooleanInput() to retrieve boolean input values
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.