Skip to content
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

Action add [skip-ci] in commit message even if is set to false #161

Closed
Revocsid opened this issue May 27, 2022 · 1 comment
Closed

Action add [skip-ci] in commit message even if is set to false #161

Revocsid opened this issue May 27, 2022 · 1 comment

Comments

@Revocsid
Copy link

Hi,

In version v3.12.0 even if I set the input skip-ci to false or "false" , the action continue to add [skip-ci] part into the commit message.

I saw that at the line : https://github.com/TriPSs/conventional-changelog-action/blob/releases/v3/src/index.js#L46
We have

const skipCi = core.getInput('skip-ci')

while with the other inputs of "type" boolean are processed like this

const skipGitPull = core.getInput('skip-git-pull').toLowerCase() === 'true'

It seems like getInput method always return a string so this part of code is always reached (https://github.com/TriPSs/conventional-changelog-action/blob/releases/v3/src/index.js#L48)

if (skipCi) {
      gitCommitMessage += " [skip ci]"
    }

If you want to keep a "pure" boolean for this input, I think that you have to use the getBooleanInput method instead of getInput : https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md#130

@TriPSs
Copy link
Owner

TriPSs commented May 27, 2022

Good catch! Will check if I can fix this today.

@TriPSs TriPSs closed this as completed in ae32d56 May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants