Skip to content

Commit

Permalink
Add note about bot authorization (#1406)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon authored Aug 26, 2023
1 parent 7e3dc9b commit 93203d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/bot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ async function bot(core, github, context, uuid) {
}
console.log("Comment found in payload");

// user's org membership must be public for the author_association to be MEMBER
// go to the org's member page, find yourself, and set the visibility to public
const author = payload.comment.user.login;
const authorized = ["OWNER", "MEMBER"].includes(payload.comment.author_association);
if (!authorized) {
Expand Down Expand Up @@ -152,4 +154,4 @@ module.exports = async (core, github, context, uuid) => {
bot(core, github, context, uuid).catch((error) => {
core.setFailed(error);
});
}
}

0 comments on commit 93203d9

Please sign in to comment.