generate_changelog.actions.matching.SummaryRegexMatch

SummaryRegexMatch#

class generate_changelog.actions.matching.SummaryRegexMatch[source]#

Matches the commit summary using a regular expression.

If pattern is None all commits will match.

Example

In .changelog-config.yaml

commit_classifiers:
- action: SummaryRegexMatch
  category: New
  kwargs:
    pattern: (?i)^(?:new|add)[^\n]*$
Parameters:

pattern (Optional[str]) – The pattern to match against the commit summary

__init__(pattern=None)[source]#
Parameters:

pattern (str | None) –

__call__(commit)[source]#

Does the commit summary match the pattern?

Return type:

bool

Parameters:

commit (CommitContext) –