Skip to content

helpURL input should overrule configuration #705

@korthout

Description

@korthout

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions