From 34c3319ac250dd042154c27fcf2dfbe9ef76c3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Wed, 26 Nov 2025 15:33:00 +0200 Subject: [PATCH] Update github action file --- .github/workflows/restrict-pr-authors.yaml | 49 ++++++++++++---------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/restrict-pr-authors.yaml b/.github/workflows/restrict-pr-authors.yaml index 6f47e2da0..56f41ab06 100644 --- a/.github/workflows/restrict-pr-authors.yaml +++ b/.github/workflows/restrict-pr-authors.yaml @@ -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."); +# */