From 544670f6c6d9d4271fad192be37aadf7575d8d68 Mon Sep 17 00:00:00 2001 From: Janne Kaikkonen <123365478+kaikkone4@users.noreply.github.com> Date: Wed, 29 Jul 2026 15:19:50 +0000 Subject: [PATCH] chore: assign Dependabot pull requests to repository owner --- .github/workflows/assign-dependabot.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/assign-dependabot.yml diff --git a/.github/workflows/assign-dependabot.yml b/.github/workflows/assign-dependabot.yml new file mode 100644 index 0000000..121b8f3 --- /dev/null +++ b/.github/workflows/assign-dependabot.yml @@ -0,0 +1,23 @@ +name: Assign Dependabot pull requests + +on: + pull_request_target: + types: [opened, reopened] + +permissions: + pull-requests: write + +jobs: + assign: + if: github.event.pull_request.user.login == 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - name: Assign repository owner + env: + GH_TOKEN: ${{ github.token }} + REPOSITORY: ${{ github.repository }} + PR_NUMBER: ${{ github.event.pull_request.number }} + run: >- + gh api --method POST + "repos/${REPOSITORY}/issues/${PR_NUMBER}/assignees" + -f assignees[]='kaikkone4'