Skip to content

Commit 4313c53

Browse files
committed
Add GitHub Action to auto-assign Dependabot PRs to @millerm30
1 parent 1ffb99d commit 4313c53

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Auto-assign Dependabot PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
auto-assign:
9+
runs-on: ubuntu-latest
10+
if: github.event.pull_request.author.is_bot == true && github.event.pull_request.author.login == 'app/dependabot'
11+
steps:
12+
- name: Auto-assign PR to @millerm30
13+
uses: actions/github-script@v7
14+
with:
15+
script: |
16+
// Auto-assign the PR to @millerm30
17+
await github.rest.issues.addAssignees({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
issue_number: context.issue.number,
21+
assignees: ['millerm30']
22+
});
23+
24+
// Request review from @millerm30
25+
await github.rest.pulls.requestReviewers({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
pull_number: context.issue.number,
29+
reviewers: ['millerm30']
30+
});
31+
32+
console.log(`Auto-assigned Dependabot PR #${context.issue.number} to @millerm30`);
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)