metadata
Metadata callback and processing functions.
CLASS | DESCRIPTION |
---|---|
MetadataCollector |
Creates a callable to collect key-value metadata. |
ParseAzureBoardIssue |
Parse Azure board issues from commits. |
ParseBreakingChangeFooter |
Parse a breaking change footer. |
ParseConventionalCommit |
Parse a line of text using the conventional commit syntax. |
ParseGitHubIssue |
Parse GitHub issue references from commits. |
ParseIssue |
Base class to parse an issue reference and put it into the commit metadata. |
ParseJiraIssue |
Parse Jira issues from commits. |
ParseTrailers |
Parse and extract trailers from a commit message. |
Classes¶
MetadataCollector
dataclass
¶
Creates a callable to collect key-value metadata.
METHOD | DESCRIPTION |
---|---|
__call__ |
Put keyword arguments into metadata storage. |
ParseAzureBoardIssue
¶
Bases: ParseIssue
Parse Azure board issues from commits.
Link these Azure board issues to their source using a URL pattern like:
https://dev.azure.com/<organization>/<project>/_workitems/edit/<issue number>
References
- https://docs.microsoft.com/en-us/azure/devops/boards/github/link-to-from-github
ParseConventionalCommit
¶
ParseConventionalCommit(commit_metadata: Callable)
Parse a line of text using the conventional commit syntax.
The metadata will contain commit_type
, a string and scopes
, an empty list or a list of strings.
If a breaking change is indicated (with the !
), metadata will also contain has_breaking_change
set
to True
.
The description is returned for further processing.
If the summary does not match a conventional commit, the whole line is returned.
METHOD | DESCRIPTION |
---|---|
__call__ |
Parse a line of text using the conventional commit syntax. |
ParseGitHubIssue
¶
Bases: ParseIssue
Parse GitHub issue references from commits.
Link these GitHub issues to their source using a URL pattern like:
https://github.com/<owner>/<repository>/issues/<issue number>
References
- https://docs.github.com/en/ get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls
ParseIssue
¶
Base class to parse an issue reference and put it into the commit metadata.
METHOD | DESCRIPTION |
---|---|
__call__ |
Put the issue(s) reference into the commit metadata using the keyword |
ParseJiraIssue
¶
Bases: ParseIssue
Parse Jira issues from commits.
References
- https://support.atlassian.com/jira-software-cloud/docs/process-issues-with-smart-commits/