Update github action file
This commit is contained in:
parent
f2ad0569c0
commit
450fe1d09c
|
|
@ -31,6 +31,7 @@ on:
|
|||
- dev_odex25_helpdesk
|
||||
- dev_odex25_donation
|
||||
- dev_odex25_ensan
|
||||
|
||||
jobs:
|
||||
check_pr_author:
|
||||
runs-on: linting_odex25-standard-modules_runner
|
||||
|
|
@ -74,31 +75,35 @@ jobs:
|
|||
});
|
||||
return;
|
||||
}
|
||||
core.info("All PR authors are allowed.");
|
||||
|
||||
// Check commit authors
|
||||
const commitList = await github.rest.pulls.listCommits({
|
||||
owner,
|
||||
repo,
|
||||
pull_number: pr.number
|
||||
});
|
||||
# // Check commit authors
|
||||
# const commitList = await github.rest.pulls.listCommits({
|
||||
# owner,
|
||||
# repo,
|
||||
# pull_number: pr.number
|
||||
# });
|
||||
|
||||
core.info("PR author is allowed.");
|
||||
|
||||
# for (const commit of commitList.data) {
|
||||
# const commitAuthor = commit.author ? commit.author.login : null;
|
||||
# core.info("PR author is allowed.");
|
||||
|
||||
# if (commitAuthor && !allowed.includes(commitAuthor)) {
|
||||
# core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`);
|
||||
# // Uncomment below if you want to block unauthorized commit authors also
|
||||
# /*
|
||||
# for (const commit of commitList.data) {
|
||||
# const commitAuthor = commit.author ? commit.author.login : null;
|
||||
|
||||
# await github.rest.pulls.update({
|
||||
# owner,
|
||||
# repo,
|
||||
# pull_number: pr.number,
|
||||
# state: "closed"
|
||||
# });
|
||||
# if (commitAuthor && !allowed.includes(commitAuthor)) {
|
||||
# core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`);
|
||||
|
||||
# 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