Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using \* within the title regex appears to cause a failure. #15

Open
shellscape opened this issue Oct 21, 2023 · 0 comments
Open

Using \* within the title regex appears to cause a failure. #15

shellscape opened this issue Oct 21, 2023 · 0 comments

Comments

@shellscape
Copy link

Describe the bug

Using \* within the title regex appears to cause a failure.

To Reproduce

Using this config:

      - name: Check PR Title
        uses: clowdhaus/actions/pr-title
        with:
          on-fail-message: "Your PR title doesn't match the required format. The title should be in the conventional commit (https://www.conventionalcommits.org/en/v1.0.0-beta.4/) format. e.g.\n\n```\nchore: add pr title workflow\n```. Note that scopes should not contain spaces."
          title-regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\((\*|[\w|,|\-|\|]+)\))?(!)?\:\s.*'
          github-token: ${{ secrets.GITHUB_TOKEN }}

Attempt to validate a PR title of fix(*): use tsup (again) to produce compatible esm and cjs builds

Expected behavior

As evidenced by testing the regex manually:

/^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\((\*|[\w|,|\-|\|]+)\))?(!)?\:\s.*/.test('fix(*): use tsup (again) to produce compatible esm and cjs builds')

The regular expression is valid and the PR title provided as an example passes test. The workflow shouldn't be failing.

Screenshots

n/a

Environment (please complete the following information):

A failing workflow can be seen here: https://github.com/shellscape/jsx-email/actions/runs/6595077760/job/17919681726?pr=42#step:3:6

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant