Update github action file
This commit is contained in:
parent
08d3d2c9f2
commit
a5b51eb3d0
|
|
@ -82,21 +82,23 @@ jobs:
|
||||||
pull_number: pr.number
|
pull_number: pr.number
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const commit of commitList.data) {
|
core.info("PR author is allowed.");
|
||||||
const commitAuthor = commit.author ? commit.author.login : null;
|
|
||||||
|
|
||||||
if (commitAuthor && !allowed.includes(commitAuthor)) {
|
# for (const commit of commitList.data) {
|
||||||
core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`);
|
# const commitAuthor = commit.author ? commit.author.login : null;
|
||||||
|
|
||||||
await github.rest.pulls.update({
|
# if (commitAuthor && !allowed.includes(commitAuthor)) {
|
||||||
owner,
|
# core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`);
|
||||||
repo,
|
|
||||||
pull_number: pr.number,
|
|
||||||
state: "closed"
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
# await github.rest.pulls.update({
|
||||||
}
|
# owner,
|
||||||
}
|
# repo,
|
||||||
|
# pull_number: pr.number,
|
||||||
|
# state: "closed"
|
||||||
|
# });
|
||||||
|
|
||||||
core.info("All PR authors and committers are allowed.");
|
# return;
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
# core.info("All PR authors and committers are allowed.");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue