Skip to content

Commit db034cc

Browse files
Copilot0x5t4l1n
andauthored
Refine dedupe matching and recipient warning flow
Agent-Logs-Url: https://github.com/th30d4y/.github/sessions/408104c2-72ed-479a-991f-56f817c13e51 Co-authored-by: Stalin-143 <161853795+Stalin-143@users.noreply.github.com>
1 parent b3524b3 commit db034cc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/org-bot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ jobs:
6464
per_page: 100
6565
});
6666
67+
const normalize = (text) => (text || "").replace(/\r\n/g, "\n").trim();
68+
const expected = normalize(message);
6769
const alreadyCommented = comments.some((comment) => {
6870
if (!comment?.body) return false;
6971
if (!comment.user?.type?.toLowerCase().includes('bot')) return false;
70-
return comment.body.includes("👋 Hello! Thanks for your contribution.") &&
71-
comment.body.includes("th30d4y");
72+
return normalize(comment.body) === expected;
7273
});
7374
7475
if (alreadyCommented) {
@@ -102,7 +103,7 @@ jobs:
102103
});
103104
104105
if (!admins.length) {
105-
core.setFailed(`No organization owners/admins found for org "${org}".`);
106+
core.warning(`No organization owners/admins found for org "${org}".`);
106107
return "";
107108
}
108109

0 commit comments

Comments
 (0)