-
-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Description
Hey,
I use your action to validate the pull requests. The following regexp is defined as headerPattern: ^(?:\[[A-Z]*-\d* \/fixed\] )?(?<type>\w*)(?:\((?<scope>[\w$.\-*\/ ]*)\))?: (?<subject>(?:.(?!(?i)\/fixed))*)$. The action throws an issue, the the group is invalid.
I tested the regexp on regexp101 and seems to be valid, but the actions throws that issue. Can anyone explain, why the action is throwing this issue or how I can improve the action configuration?
name: "Lint PR"
on:
pull_request_target:
types:
- opened
- edited
- reopened
jobs:
main:
name: "Validate PR title"
runs-on: docker
permissions:
pull-requests: read
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Conventional Commits: https://www.conventionalcommits.org/en/v1.0.0/
# RegExp101: https://regex101.com/r/PWba2g
#
# Examples:
# fix(backend): adapt /u/qu-seed/resources/internal/examples
# docs(README): add missing documentation about environment variables
# [HDEFECT-1234 /fixed] fix(backend): adapt /u/qu-seed/resources/internal/examples
# [HDEFECT-1234 /fixed] docs(README): add missing documentation about environment variables
headerPattern: '^(?:\[[A-Z]*-\d* \/fixed\] )?(?<type>\w*)(?:\((?<scope>[\w$.\-*\/ ]*)\))?: (?<subject>(?:.(?!(?i)\/fixed))*)$'
headerPatternCorrespondence: type, scope, subject
# Configure which scopes are allowed (newline-delimited).
# These are regex patterns auto-wrapped in `^ $`.
# scopes: |
# core
# ui
# JIRA-\d+
# Ensure, that a scope is present
requireScope: true
uses: amannn/action-semantic-pull-request@v6.1.1Metadata
Metadata
Assignees
Labels
No labels