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

"inherit" behavior is not being honored for boolean inputs #23

Closed
nadiamoe opened this issue Jan 25, 2021 · 3 comments
Closed

"inherit" behavior is not being honored for boolean inputs #23

nadiamoe opened this issue Jan 25, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@nadiamoe
Copy link

nadiamoe commented Jan 25, 2021

Describe the bug

The documentation states that many boolean inputs (e.g. issues, issuesWoLabels, pullRequests, prWoLabels) default to the defaults of https://github.com/github-changelog-generator/github-changelog-generator. However, this is not currently the case.

The istrue helper will return false for empty variables, resulting in all ommited boolean parameters to default to false.

Reproduce

Use the action without specifying issues, issuesWoLabels, pullRequests and prWoLabels. It will generate an empty changelog.

Expected behavior

Boolean inputs should respect the defaults of https://github.com/github-changelog-generator/github-changelog-generator.

Additional context

This can be fixed by wrapping lines that use istrue

if istrue "$INPUT_ISSUES"; then ARG_ISSUES="--issues"; else ARG_ISSUES="--no-issues"; fi

with -n test as well:

if [[ -n $INPUT_ISSUES ]]; then if istrue "$INPUT_ISSUES"; then ARG_ISSUES="--issues"; else ARG_ISSUES="--no-issues"; fi; fi
@kamronbatman
Copy link

I personally prefer opt-in. This should be the default.

k0da added a commit to k8gb-io/k8gb that referenced this issue Mar 22, 2021
Due to bug janheinrichmerker/action-github-changelog-generator#23
we have to set booleans explicitly.

Signed-off-by: Dinar Valeev <[email protected]>
k0da added a commit to k8gb-io/k8gb that referenced this issue Mar 22, 2021
Due to bug janheinrichmerker/action-github-changelog-generator#23
we have to set booleans explicitly.

Signed-off-by: Dinar Valeev <[email protected]>
k0da added a commit to k8gb-io/k8gb that referenced this issue Mar 22, 2021
Due to bug janheinrichmerker/action-github-changelog-generator#23
we have to set booleans explicitly.

Signed-off-by: Dinar Valeev <[email protected]>
boswelja added a commit to boswelja/WatchConnectionLib that referenced this issue Apr 26, 2021
Due to a bug (janheinrichmerker/action-github-changelog-generator#23), the default inherit mode for inputs is ignored and they're all set to false.
@boswelja
Copy link

Can we get an update on this? Either set defaults for inputs or fix the inherit behavior.

@janheinrichmerker
Copy link
Owner

Thanks @roobre, very good catch!
Indeed we should not pass options to Docker that were not specified in the action.
The default should always as closely as possible inherit the Docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants