Skip to content

chore(ci): fix regex & if statement in related issue script #1437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ module.exports = Object.freeze({
"IGNORE_AUTHORS": ["dependabot[bot]"],

/** @type {RegExp} */
"RELATED_ISSUE_REGEX": /\bIssue number:(?<closingWord>:closes?|close|fix|fixes?|fixed|resolves?|resolved)?\s*#(?<issue>\d+)\b/
"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/
});
2 changes: 1 addition & 1 deletion .github/scripts/label_missing_related_issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = async ({ github, context, core }) => {
return core.notice("Author in IGNORE_AUTHORS list; skipping...");
}

if (["opened"].includes(PR_ACTION)) {
if (!["opened"].includes(PR_ACTION)) {
return core.notice(
"Only newly opened PRs are labelled to avoid spam; skipping"
);
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/label_pr_based_on_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = async ({ github, context, core }) => {
} finally {
if (miss == Object.keys(labels).length) {
core.notice(
`PR ${PR_NUMBER} title '${PR_TITLE}' doesn't follow semantic titles; skipping...`
`PR ${PR_NUMBER} title '${PR_TITLE}' contain any of the release-related types; skipping...`
);
}
}
Expand Down