[Eden] 챕터 15, 16 #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '[CI] PR Assignee 자동 지정' | |
permissions: | |
issues: write | |
pull-requests: write | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
assign-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Assign PR to the author | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const prAuthor = context.payload.pull_request.user.login; | |
github.rest.issues.addAssignees({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.pull_request.number, | |
assignees: [prAuthor] | |
}) |