Skip to content

Commit

Permalink
chore: Release 4.4.0 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Apr 22, 2022
1 parent 956659a commit bc0a635
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [4.4.0](https://github.com/amannn/action-semantic-pull-request/compare/v4.3.0...v4.4.0) (2022-04-22)


### Features

* Add options to pass custom regex to conventional-commits-parser ([#177](https://github.com/amannn/action-semantic-pull-request/issues/177)) ([956659a](https://github.com/amannn/action-semantic-pull-request/commit/956659ae00eaa0b00fe5a58dfdf3a3db1efd1d63))

## [4.3.0](https://github.com/amannn/action-semantic-pull-request/compare/v4.2.0...v4.3.0) (2022-04-13)


Expand Down
40 changes: 37 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35660,6 +35660,8 @@ module.exports = async function run() {
wip,
subjectPattern,
subjectPatternError,
headerPattern,
headerPatternCorrespondence,
validateSingleCommit,
validateSingleCommitMatchesPrTitle,
githubBaseUrl,
Expand Down Expand Up @@ -35714,7 +35716,9 @@ module.exports = async function run() {
scopes,
requireScope,
subjectPattern,
subjectPatternError
subjectPatternError,
headerPattern,
headerPatternCorrespondence
});

if (validateSingleCommit) {
Expand Down Expand Up @@ -35753,7 +35757,9 @@ module.exports = async function run() {
scopes,
requireScope,
subjectPattern,
subjectPatternError
subjectPatternError,
headerPattern,
headerPatternCorrespondence
});
} catch (error) {
throw new Error(
Expand Down Expand Up @@ -35844,6 +35850,18 @@ module.exports = function parseConfig() {
);
}

let headerPattern;
if (process.env.INPUT_HEADERPATTERN) {
headerPattern = ConfigParser.parseString(process.env.INPUT_HEADERPATTERN);
}

let headerPatternCorrespondence;
if (process.env.INPUT_HEADERPATTERNCORRESPONDENCE) {
headerPatternCorrespondence = ConfigParser.parseString(
process.env.INPUT_HEADERPATTERNCORRESPONDENCE
);
}

let wip;
if (process.env.INPUT_WIP) {
wip = ConfigParser.parseBoolean(process.env.INPUT_WIP);
Expand Down Expand Up @@ -35880,6 +35898,8 @@ module.exports = function parseConfig() {
wip,
subjectPattern,
subjectPatternError,
headerPattern,
headerPatternCorrespondence,
validateSingleCommit,
validateSingleCommitMatchesPrTitle,
githubBaseUrl,
Expand All @@ -35902,11 +35922,25 @@ const defaultTypes = Object.keys(conventionalCommitTypes.types);

module.exports = async function validatePrTitle(
prTitle,
{types, scopes, requireScope, subjectPattern, subjectPatternError} = {}
{
types,
scopes,
requireScope,
subjectPattern,
subjectPatternError,
headerPattern,
headerPatternCorrespondence
} = {}
) {
if (!types) types = defaultTypes;

const {parserOpts} = await conventionalCommitsConfig();
if (headerPattern) {
parserOpts.headerPattern = headerPattern;
}
if (headerPatternCorrespondence) {
parserOpts.headerCorrespondence = headerPatternCorrespondence;
}
const result = parser(prTitle, parserOpts);

function printAvailableTypes() {
Expand Down

0 comments on commit bc0a635

Please sign in to comment.