Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

danger: Use a regular message for notice about GitHub Issue links (#16287)

Marshall Bowerse10f2d8deb69
diff --git a/script/danger/dangerfile.ts b/script/danger/dangerfile.ts
index d26b3c347b1..db3a13822b3 100644
--- a/script/danger/dangerfile.ts
+++ b/script/danger/dangerfile.ts
@@ -1,4 +1,4 @@
-import { danger, warn } from "danger";
+import { danger, message, warn } from "danger";
const { prHygiene } = require("danger-plugin-pr-hygiene");
prHygiene({
@@ -44,7 +44,7 @@ const ISSUE_LINK_PATTERN = new RegExp(
const includesIssueUrl = ISSUE_LINK_PATTERN.test(body);
if (includesIssueUrl) {
- const matches = body.match(ISSUE_LINK_PATTERN);
+ const matches = body.match(ISSUE_LINK_PATTERN) ?? [];
const issues = matches
.map((match) =>
match
@@ -53,7 +53,7 @@ if (includesIssueUrl) {
)
.filter((issue, index, self) => self.indexOf(issue) === index);
- warn(
+ message(
[
"This PR includes links to the following GitHub Issues: " +
issues.map((issue) => `#${issue}`).join(", "),