Skip to content

Commit 8f4c4b4

Browse files
authored
chore(ci): fix regex & if statement in related issue script (#1437)
* chore: fix regex & if statement * chore: fix if/else
1 parent c34c108 commit 8f4c4b4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: .github/scripts/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ module.exports = Object.freeze({
3737
"IGNORE_AUTHORS": ["dependabot[bot]"],
3838

3939
/** @type {RegExp} */
40-
"RELATED_ISSUE_REGEX": /\bIssue number:(?<closingWord>:closes?|close|fix|fixes?|fixed|resolves?|resolved)?\s*#(?<issue>\d+)\b/
40+
"RELATED_ISSUE_REGEX": /\b\*{0,2}[iI]ssue [nN]umber\*{0,2}:\*{0,2}\s*(?<closingWord>closes?|closed|fix|fixes?|fixed|resolves?|resolved)?\s*#(?<issue>\d+)\b/
4141
});

Diff for: .github/scripts/label_missing_related_issue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = async ({ github, context, core }) => {
1414
return core.notice("Author in IGNORE_AUTHORS list; skipping...");
1515
}
1616

17-
if (["opened"].includes(PR_ACTION)) {
17+
if (!["opened"].includes(PR_ACTION)) {
1818
return core.notice(
1919
"Only newly opened PRs are labelled to avoid spam; skipping"
2020
);

Diff for: .github/scripts/label_pr_based_on_title.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = async ({ github, context, core }) => {
3838
} finally {
3939
if (miss == Object.keys(labels).length) {
4040
core.notice(
41-
`PR ${PR_NUMBER} title '${PR_TITLE}' doesn't follow semantic titles; skipping...`
41+
`PR ${PR_NUMBER} title '${PR_TITLE}' contain any of the release-related types; skipping...`
4242
);
4343
}
4444
}

0 commit comments

Comments
 (0)