Skip to content

chore/code cleanup

chore/code cleanup #23

Workflow file for this run

name: Auto Assign PRs
on:
pull_request:
types: [opened, reopened]
jobs:
assign:
runs-on: ubuntu-latest
steps:
- name: Assign Reviewers and Assignees
uses: actions/github-script@v6
with:
script: |
const reviewers = ['danielcdz'];
const assignees = [context.actor];
// Add reviewers
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers,
});
// Add assignees
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
assignees,
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}