From 7988351d8898f02e537a3c75f4e238985a018cba Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 8 Apr 2022 00:02:25 +0900 Subject: [PATCH] add PR Gatekeeper (#12646) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add PR Gatekeeper * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review Co-authored-by: Carlos MocholĂ­ * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Carlos MocholĂ­ --- .github/CODEOWNERS | 1 + .github/approve_config.yml | 17 +++++++++++++++++ .github/workflows/ci_pr-gatekeeper.yml | 25 +++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 .github/approve_config.yml create mode 100644 .github/workflows/ci_pr-gatekeeper.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8e59198512..93ebca94e4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -54,6 +54,7 @@ /tests/helpers/boring_model.py @williamfalcon @tchaton @borda /.github/CODEOWNERS @williamfalcon +/.github/approve_config.yml @williamfalcon /SECURITY.md @williamfalcon /README.md @williamfalcon @edenlightning @borda /setup.py @williamfalcon @borda diff --git a/.github/approve_config.yml b/.github/approve_config.yml new file mode 100644 index 0000000000..6038852883 --- /dev/null +++ b/.github/approve_config.yml @@ -0,0 +1,17 @@ +approvals: + # check will fail if there is no approval + minimum: 1 + groups: + - name: GridAI + minimum: 1 + from: + - awaelchli + - Borda + - carmocca + - edenlightning + - ethanwharris + - kaushikb11 + - krshrimali + - rohitgr7 + - tchaton + - williamFalcon diff --git a/.github/workflows/ci_pr-gatekeeper.yml b/.github/workflows/ci_pr-gatekeeper.yml new file mode 100644 index 0000000000..4de590ae8f --- /dev/null +++ b/.github/workflows/ci_pr-gatekeeper.yml @@ -0,0 +1,25 @@ +name: 'PR Gatekeeper' + +on: + pull_request: + types: + [ + assigned, + unassigned, + opened, + reopened, + synchronize, + review_requested, + review_request_removed + ] + pull_request_review: + +jobs: + pr-gatekeeper: + name: PR Gatekeeper + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: octodemo/pr-gatekeeper@main + with: + token: ${{ secrets.GITHUB_TOKEN }}