Skip to content

Commit 2d9403d

Browse files
authored
fix: Use authorLogin variable for bot check logging
Signed-off-by: Parv <ninamaparv@gmail.com>
1 parent 05738e5 commit 2d9403d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/scripts/linked_issue_enforce.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ module.exports = async ({ github, context }) => {
108108

109109
for (const pr of prs) {
110110

111+
const authorLogin = pr.user?.login;
112+
if (!authorLogin) {
113+
console.warn(`PR #${pr.number} missing author login. Skipping for safety.`);
114+
continue;
115+
}
111116
if (isBotAuthor(pr)) {
112-
console.log(`PR #${pr.number} authored by bot (${pr.user.login}). Skipping.`);
117+
console.log(`PR #${pr.number} authored by bot (${authorLogin}). Skipping.`);
113118
continue;
114119
}
115120

0 commit comments

Comments
 (0)