Skip to content

Issue with the CI action #310

@leikoilja

Description

@leikoilja

Describe the bug

No matter how i configure the action workflow - it keeps failing for with an error

Error: No release type found in pull request title "ci: pr title linter". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

To reproduce

My config file rn is as simple as:

# PR Title Validation
# This workflow validates PR titles using the same rules as defined in commitlint.config.js
# IMPORTANT: Keep types and scopes in sync with commitlint.config.js to maintain consistency
name: "Validate PR Title"

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize
  workflow_dispatch:

jobs:
  main:
    name: Validate PR title
    runs-on: ubuntu-slim
    permissions:
      pull-requests: read
    steps:
      - uses: amannn/action-semantic-pull-request@v6
        id: lint_pr_title
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          # Require scope to be present (matching your strict scope-enum rule)
          requireScope: false
          # Subject validation to match commitlint.config.js rules
          subjectPattern: ^(?![A-Z]).+(?<!\.)$
          subjectPatternError: |
            The subject "{subject}" found in the pull request title "{title}"
            didn't match the configured pattern. Please ensure that the subject:
            - Does not start with an uppercase letter
            - Does not end with a period (.)
            - Is not empty

            Examples of valid PR titles:
            - feat(jobs): add new job posting feature
            - fix(auth): resolve login redirect issue
            - docs(api): update authentication documentation
          # Validate entire header length (matching header-max-length: 100)
          headerPattern: "^.{1,100}$"
          headerPatternCorrespondence: type, scope, subject

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