Skip to content

Commit

Permalink
Merge pull request #34 from lauchaves/fix-ga-auto-assign
Browse files Browse the repository at this point in the history
Fix: GA Auto assign prs
  • Loading branch information
danielcdz authored Nov 25, 2024
2 parents 95e92cc + 69a7b16 commit cd59452
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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 }}

0 comments on commit cd59452

Please sign in to comment.