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

helpURL input should overrule configuration #705

Open
korthout opened this issue Mar 29, 2023 · 2 comments
Open

helpURL input should overrule configuration #705

korthout opened this issue Mar 29, 2023 · 2 comments

Comments

@korthout
Copy link

I used the following in my workflow:

- uses: wagoid/commitlint-github-action@v5
  with:
    commitDepth: ${{ github.event.pull_request.commits }}
    helpURL: http://acme.com/example-url

To my surprise, the workflow logs contained:

Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

This is because my very basic config pulled in the helpUrl from @commitlint/config-conventional.

module.exports = { extends: ['@commitlint/config-conventional'] };

To me, this was unexpected because I explicitly told the action to use http://acme.com/example-url as the helpURL.

I would propose to flip the sides of the || or operator here so the defined inputs are favored over the configuration:

helpUrl: getInput('helpURL') || config.helpUrl,
@SvenStaehs
Copy link

This happens even without an extended config; I don't have a config file at all and the helpURL is still not honored. Full config of my step:

      - uses: actions/wagoid_commitlint-github-action@456526eec71276a59e74aafdfe06a9632ac2eee1 # v5.4.1
        with:
          helpURL: "${{ github.server_url }}/${{ github.repository }}/blob/main/CONTRIBUTING.md"

Here's the output I get (with details redacted)

Run actions/wagoid_commitlint-github-action@456526eec71276a59e74aafdfe06a9632ac2eee1
with:
helpURL: https://myGHES/myOrga/myRepo/blob/main/CONTRIBUTING.md
configFile: ./commitlint.config.js
firstParent: true
failOnWarnings: false
failOnErrors: true
token: ***
/usr/bin/docker run --name wagoidcommitlintgithubaction541_242aeb [...] wagoid/commitlint-github-action:5.4.1
Error: You have commit messages with errors

[...]

✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

So it correctly sets the input, but it has no effect.

@jprecuch
Copy link

Would be nice to have this fixed somehow. Seems to be still ongoing also in v5.

Run wagoid/commitlint-github-action@v5
  with:
    helpURL: https://PROPERURL/display/CLOUDVOL/Github+commit+lint

But the error message still says the default one

Error: You have commit messages with errors

⧗   input: refactor(JIRA-80325): remove managed clusters from aks cluster creation.
✖   subject may not end with full stop [subject-full-stop]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

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

3 participants