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

Trailer-exists always fail

nascentcore-eng opened this issue · comments

A private repo has such github action configs:

      # https://github.com/JulienKode/pull-request-name-linter-action
      - name: Install Dependencies
        run: npm install @commitlint/config-conventional
      - uses: JulienKode/pull-request-name-linter-action@v0.5.0
        with:
          configuration-path: .commitlintrc.yml

The .commitlintrc.yml:

$ cat .commitlintrc.yml
---
# rules are documented at https://commitlint.js.org/#/reference-rules
# each rule has an array of three values:
# - 0, 1, 2 (rule is disabled, warning or error)
# - always/never
# - value
rules:
  # always sign off the commit
  # Cannot make this work, Signed-off-by: trailer in PR description is not
  # recognized.
  trailer-exists: [2, always, "Signed-off-by:"]

Then I have a Pull request with:
Title: Chore: test pr body trailer
Body: Signed-off-by: Yaxiong Zhao

But the check would constantly fail claiming

Screen Shot 2023-01-09 at 22 16 48

What's going on?

Have you try to pu Signed-off-by: Yaxiong Zhao as a title ?

This GitHub action checks the title of the PR and not the description

But it could be a nice feature to add to also lint the body

Oh, I suspected that is the case. Thanks for confirming that.