From 4313c5327fdd406fa4a07df0147b433a3534e0b7 Mon Sep 17 00:00:00 2001 From: mbasadi Date: Wed, 17 Sep 2025 15:08:50 -0400 Subject: [PATCH] Add GitHub Action to auto-assign Dependabot PRs to @millerm30 --- .github/workflows/dependabot-auto-assign.yml | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/dependabot-auto-assign.yml diff --git a/.github/workflows/dependabot-auto-assign.yml b/.github/workflows/dependabot-auto-assign.yml new file mode 100644 index 0000000..0435295 --- /dev/null +++ b/.github/workflows/dependabot-auto-assign.yml @@ -0,0 +1,34 @@ +name: Auto-assign Dependabot PRs + +on: + pull_request: + types: [opened] + +jobs: + auto-assign: + runs-on: ubuntu-latest + if: github.event.pull_request.author.is_bot == true && github.event.pull_request.author.login == 'app/dependabot' + steps: + - name: Auto-assign PR to @millerm30 + uses: actions/github-script@v7 + with: + script: | + // Auto-assign the PR to @millerm30 + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + assignees: ['millerm30'] + }); + + // Request review from @millerm30 + await github.rest.pulls.requestReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + reviewers: ['millerm30'] + }); + + console.log(`Auto-assigned Dependabot PR #${context.issue.number} to @millerm30`); + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}