Skip to content

regular expression support #450

@scarf005

Description

@scarf005

hi, i'd like to apply conventional PR titles for our project, and thought it'd be neat to define valid scopes by regex. for example:

scopes:
  - 'mods/(\w+)'

would match titles such as

feat(mods/foo): ...
feat(mods/bar): ...

i'm interested in opening a PR for this feature.

relevent lines:

const isScopeValid = !scopes || !scope || scope.split(',').every(scope => scopes.includes(scope));
const isTypeValid = (types.length > 0 ? types : commitTypes).includes(type);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions