87 const sender = context.payload.sender?.login;
88 if (!sender) {
89▶ throw new Error('Event has no sender — cannot check permissions');
90 }
91 try {
· · ·
106 }
107 const status = e.status ?? 'unknown';
108▶ throw new Error(
109 `Permission check failed for ${sender} (HTTP ${status}): ${e.message}`,
110 );
· · ·
265 console.log(`PR author "${prAuthor}" is NOT assigned to #${num} (assignees: ${assignees.join(', ') || 'none'})`);
266 }
267▶ } catch (error) {
268 if (error.status === 404) {
269 console.log(`Issue #${num} not found — skipping`);
· · ·
268▶ if (error.status === 404) {
269 console.log(`Issue #${num} not found — skipping`);
270 } else {
· · ·
271▶ // Non-404 errors (rate limit, server error) must not be
272 // silently skipped — they could cause false enforcement
273 // (closing a legitimate PR whose assignment can't be verified).
+ 4 more matches in this file