From ef54e7130525634d5cf9b6f9aea4569622073318 Mon Sep 17 00:00:00 2001 From: Vincent Guilpain Date: Mon, 26 May 2025 11:23:38 +0900 Subject: [PATCH] Add action to assign review on PR created by Dependabot --- .github/CODEOWNERS | 2 -- .../assign-dependabot-pr-reviewers.yaml | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) delete mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/assign-dependabot-pr-reviewers.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 17c0ec588d..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# Members of the ScalarDB team will be automatically requested for review on any pull request -* @scalar-labs/scalardb diff --git a/.github/workflows/assign-dependabot-pr-reviewers.yaml b/.github/workflows/assign-dependabot-pr-reviewers.yaml new file mode 100644 index 0000000000..dad838304a --- /dev/null +++ b/.github/workflows/assign-dependabot-pr-reviewers.yaml @@ -0,0 +1,23 @@ +name: Assign reviewer to dependabot PRs +# This action assigns the ScalarDB team as reviewers when Dependabot opens a pull request. + +on: + pull_request: + types: [opened] + +jobs: + assign-reviewer: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + + permissions: + pull-requests: write + + steps: + - name: Assign ScalarDB team as reviewers for Dependabot PRs + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPOSITORY: ${{ github.repository }} + run: gh pr edit $PR_NUMBER --repo $REPOSITORY --add-reviewer scalar-labs/scalardb +