forked from espressif/esp-idf
Merge branch 'ci/fix_dangerjs_close_not_jira_link' into 'master'
ci: fix dangerjs "closes anything_but_not_a_jira_link" See merge request espressif/esp-idf!22797
This commit is contained in:
@@ -139,20 +139,23 @@ module.exports = async function () {
|
|||||||
const correctJiraClosingLinkFormat = new RegExp(
|
const correctJiraClosingLinkFormat = new RegExp(
|
||||||
`^- Closes ${jiraTicketRegex.source}$`
|
`^- Closes ${jiraTicketRegex.source}$`
|
||||||
);
|
);
|
||||||
|
const matchedJiraTicket = line.match(jiraTicketRegex);
|
||||||
|
if (matchedJiraTicket) {
|
||||||
if (!correctJiraClosingLinkFormat.test(line)) {
|
if (!correctJiraClosingLinkFormat.test(line)) {
|
||||||
closingTickets.push({
|
closingTickets.push({
|
||||||
record: line,
|
record: line,
|
||||||
ticketName: line.match(jiraTicketRegex)[0],
|
ticketName: matchedJiraTicket[0],
|
||||||
correctFormat: false,
|
correctFormat: false,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
closingTickets.push({
|
closingTickets.push({
|
||||||
record: line,
|
record: line,
|
||||||
ticketName: line.match(jiraTicketRegex)[0],
|
ticketName: matchedJiraTicket[0],
|
||||||
correctFormat: true,
|
correctFormat: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return closingTickets;
|
return closingTickets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user