JulienKode / pull-request-name-linter-action

⚡️ Lint pull request name with commit lint. This is useful if you squash merge your pull requests ⚡️

Home Page:https://github.com/marketplace/actions/pull-request-linter-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible select the configuration file?

bberos opened this issue · comments

Hi,
I'm working on a project that has a standardized configs files using .json, example .commitlintrc.json, .eslintrc.json, etc., and it's not possible to use .js config files.

I tried copy pasted README example:

name:  pr-name-linter
on:
  pull_request:
    types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: JulienKode/pull-request-name-linter-action@v0.1.0

but obviously throw:

Error: Error: ENOENT: no such file or directory, open '.../commitlint.config.js'
Error: ENOENT: no such file or directory, open '.../commitlint.config.js

Is it possible select my configuration file or only works with commitlint.config.js?

Thanks!

Yes it is, set the configuration-path parameter
Example

     - name: Lint the PR message
        uses: JulienKode/pull-request-name-linter-action@v0.5.0
        with:
          configuration-path: ./.commitlintrc.yml

That worked!

Thank you @Nithos !!

Thanks @Nithos for helping

I'll close it, feel free to re-open if needed