Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/run-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
const adder = context.payload.sender.login;
const senderType = context.payload.sender.type;
const pr = context.payload.pull_request;
const installation = context.payload.installation;

console.log(`Sender: ${adder} (type: ${senderType})`);

const trustedBotLogins = ['graphite-app[bot]'];
let isAuthorized = false;

if (senderType === 'Bot' && installation && trustedBotLogins.includes(adder)) {
console.log(`Label added by trusted GitHub App: ${adder}`);
if (senderType === 'Bot' && trustedBotLogins.includes(adder)) {
console.log(`Authorized: trusted GitHub App`);
isAuthorized = true;
}

Expand All @@ -43,7 +44,7 @@ jobs:
return;
}

console.log(`Label added by ${adder} (${perm.permission})`);
console.log(`Label added by ${adder}`);
}

// Find the latest pr.yml run for this PR's head SHA
Expand Down
Loading