Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/external-pr-review-assignment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Assign reviewers for external PRs

on:
pull_request_target:
types: [opened, ready_for_review, reopened]

permissions:
pull-requests: write
contents: read

jobs:
assign-reviewers:
# THe 'if' statement below will exclude Dependabot PRs and Internal ('MEMBER') PRs
if: >
github.actor != 'dependabot[bot]' &&
github.event.pull_request.author_association != 'MEMBER' &&
Comment on lines +13 to +16
github.event.pull_request.head.repo.fork
Comment on lines +13 to +17
runs-on: ubuntu-latest
# The job below will use the built-in "Request reviewers for a pull request" script to assign reviewers
steps:
- name: Assign reviewer from Bicep External Maintainers team
uses: actions/github-script@v7
with:
script: |
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
team_reviewers: ['bicep-external-maintainers']
})
Loading