Skip to content

This only looks at my first commit, not my latest #797

@daltschu22

Description

@daltschu22

I have workflow of this

name: PR Checks

on:
  pull_request:
    branches:
      - main
    types:
      - labeled
      - unlabeled
      - opened
      - synchronize
      - reopened

permissions: 
  contents: read
  pull-requests: read

jobs:
  commitlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: wagoid/commitlint-github-action@v6

I have these commits:

commit 91aad744e72b2cbe36b39a005f2cd88d75aaf8a8 (HEAD -> test3, origin/test3)
Author: daltschuler
Date:   Wed Aug 14 14:51:38 2024 -0400

    fix: good

commit cc028ce88cd7a9707c8b41a9a6e23f96c4f407fe
Author: daltschuler
Date:   Wed Aug 14 14:50:36 2024 -0400

    bad

Yet I get this error

Error: You have commit messages with errors

⧗   input: bad
✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

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

Ive tried all manor of commit depth modifications both on the commitlint action and the checkout action. I cant seem to get this to work properly.

I want to only check the latest commit for a formatted message, I dont want to fail if the first commit was malformed but a newer commit wasnt.

Any ideas?

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