Skip to content

Commit

Permalink
Fix: GA Auto assign prs
Browse files Browse the repository at this point in the history
  • Loading branch information
lauchaves committed Nov 25, 2024
1 parent 95e92cc commit b822c2c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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 { github, context } = require('@actions/github');
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 }}

0 comments on commit b822c2c

Please sign in to comment.