Skip to content

[DO NOT MERGE] Enable Privacy Pro Rebranding #1251

[DO NOT MERGE] Enable Privacy Pro Rebranding

[DO NOT MERGE] Enable Privacy Pro Rebranding #1251

name: Auto Assign Assignees as Reviewers
on:
pull_request:
types: [opened, ready_for_review, reopened, synchronize, assigned, unassigned]
jobs:
assign-and-request-review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get PR details
id: pr
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
});
const assignees = pr.data.assignees.map(a => a.login)
if (assignees.length > 0) {
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers: assignees
});
}