Skip to content

Commit d7d758e

Browse files
authored
Add action to assign reviewers to Dependabot PRs (#35)
1 parent 825e9d3 commit d7d758e

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "weekly"
12-
reviewers:
13-
- "scalar-labs/scalardb"
12+
day: "monday"
13+
time: "01:00"
14+
timezone: "Asia/Tokyo"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Assign reviewer to dependabot PRs
2+
# This action assigns the ScalarDB team as reviewers when Dependabot opens a pull request.
3+
4+
on:
5+
pull_request:
6+
types: [opened]
7+
8+
jobs:
9+
assign-reviewer:
10+
runs-on: ubuntu-latest
11+
if: github.actor == 'dependabot[bot]'
12+
13+
steps:
14+
- name: Assign ScalarDB team as reviewers for Dependabot PRs
15+
env:
16+
GH_TOKEN: ${{ secrets.ASSIGN_PR_REVIEWERS_PAT }}
17+
PR_NUMBER: ${{ github.event.pull_request.number }}
18+
REPOSITORY: ${{ github.repository }}
19+
run: gh pr edit $PR_NUMBER --repo $REPOSITORY --add-reviewer scalar-labs/scalardb
20+

0 commit comments

Comments
 (0)