File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,21 +22,12 @@ jobs:
2222 script : |
2323 const pr = context.payload.pull_request;
2424 const author = pr.user.login;
25- const assoc = pr.author_association;
2625
2726 // Is PR branch in the same repo (not a fork)?
2827 const sameRepo =
2928 pr.head.repo != null && pr.head.repo.id === pr.base.repo.id;
3029
31- const botAllowlist = new Set(['dependabot[bot]']);
32- const orgAuthorAssociations = new Set(['MEMBER', 'OWNER']);
33-
34- const allowed =
35- botAllowlist.has(author) ||
36- sameRepo ||
37- (assoc != null && orgAuthorAssociations.has(assoc));
38-
39- if (!allowed) {
30+ if (!sameRepo) {
4031 await github.rest.issues.createComment({
4132 owner: context.repo.owner,
4233 repo: context.repo.repo,
5344
5445 core.setFailed('Dependency changes are restricted to organization members.');
5546 } else {
56- console.log(`Author ${author} (author_association=${assoc}, sameRepo=${sameRepo}) is allowed to make dependency changes.`);
47+ console.log(`Author ${author} (sameRepo=${sameRepo}) is allowed to make dependency changes.`);
5748 }
You can’t perform that action at this time.
0 commit comments