You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!allowedAssociations.includes(issueCreatorAssociation)) {
183
+
await github.rest.issues.createComment({
184
+
owner,
185
+
repo,
186
+
issue_number: issueNumber,
187
+
body: `❌ @${user} The \`/assign\` feature is only available for issues created by OWNER, MEMBER, COLLABORATOR or CONTRIBUTOR user associations. This issue was created by @${issueCreator} who has the association: ${issueCreatorAssociation}.`,
188
+
});
189
+
console.log(`Denied /assign for ${user} - Issue creator ${issueCreator} has insufficient association (${issueCreatorAssociation})`);
190
+
return;
191
+
}
192
+
193
+
console.log(`Issue creator ${issueCreator} has sufficient association (${issueCreatorAssociation}), allowing /assign for ${user}`);
194
+
}
195
+
152
196
// Log the type of user association
153
197
console.log(`Commenting user ${user} is a ${association}`);
0 commit comments