Skip to content

Commit

Permalink
Merge pull request #71 from theohbrothers/enhancement/generate-fix-re…
Browse files Browse the repository at this point in the history
…gex-patterns-for-matching-commit-messages-following-categorized-conventions

Enhancement (generate): Fix regex patterns for matching commit messages following categorized conventions
  • Loading branch information
joeltimothyoh authored May 20, 2024
2 parents 41e70a8 + 56e0263 commit 403b810
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Changes-HashSubject-NoMerges-Categorized {
}
)
$commitHistoryUncategorized = $commitHistoryTrimmed | % {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)")) {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)")) {
$_
}
}
Expand All @@ -69,7 +69,7 @@ function Changes-HashSubject-NoMerges-Categorized {
foreach ($c in $commitCategory) {
$isTitleOutputted = $false
$commitHistoryTrimmed | % {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)") {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") {
if (!$isTitleOutputted) {
@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized {
}
)
$commitHistoryUncategorized = $commitHistoryTrimmed | % {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)")) {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)")) {
$_
}
}
Expand All @@ -69,7 +69,7 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized {
foreach ($c in $commitCategory) {
$isTitleOutputted = $false
$commitHistoryTrimmed | % {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)") {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") {
if (!$isTitleOutputted) {
@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function VersionDate-HashSubject-NoMerges-Categorized {
}
)
$commitHistoryUncategorized = $commitHistoryTrimmed | % {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)")) {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)")) {
$_
}
}
Expand All @@ -69,7 +69,7 @@ function VersionDate-HashSubject-NoMerges-Categorized {
foreach ($c in $commitCategory) {
$isTitleOutputted = $false
$commitHistoryTrimmed | % {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)") {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") {
if (!$isTitleOutputted) {
@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized {
}
)
$commitHistoryUncategorized = $commitHistoryTrimmed | % {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)")) {
if (!($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)")) {
$_
}
}
Expand All @@ -69,7 +69,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized {
foreach ($c in $commitCategory) {
$isTitleOutputted = $false
$commitHistoryTrimmed | % {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)") {
if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") {
if (!$isTitleOutputted) {
@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function VersionDate-Subject-NoMerges-Categorized {
}
)
$commitHistoryUncategorized = $commitHistoryTrimmed | % {
if (!($_ -match "^(\s*\w+\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)")) {
if (!($_ -match "^(\s*\w+\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)")) {
$_
}
}
Expand All @@ -69,7 +69,7 @@ function VersionDate-Subject-NoMerges-Categorized {
foreach ($c in $commitCategory) {
$isTitleOutputted = $false
$commitHistoryTrimmed | % {
if ($_ -match "^(\s*$($c['Name'])\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)") {
if ($_ -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") {
if (!$isTitleOutputted) {
@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized {
}
)
$commitHistoryUncategorized = $commitHistoryTrimmed | % {
if (!($_ -match "^(\s*\w+\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)")) {
if (!($_ -match "^(\s*\w+\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)")) {
$_
}
}
Expand All @@ -69,7 +69,7 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized {
foreach ($c in $commitCategory) {
$isTitleOutputted = $false
$commitHistoryTrimmed | % {
if ($_ -match "^(\s*$($c['Name'])\s*\(\s*[a-zA-Z0-9_-]+\s*\)\s*:)(.+)") {
if ($_ -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") {
if (!$isTitleOutputted) {
@"
Expand Down

0 comments on commit 403b810

Please sign in to comment.