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