Resolve merge conflict in README.md
between main
and develop
branches
#9
Workflow file for this run
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: PR assignment | |
on: | |
pull_request_target: | |
types: [opened, edited, synchronize, reopened, ready_for_review] | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
jobs: | |
auto-assign: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Request Reviewers | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const author = context.payload.pull_request.user.login; | |
let reviewers = ['jinhwankim6557', 'gw-nam', 'yoongyu-lee']; | |
if (reviewers.includes(author)) { | |
if(reviewers.length === 1) | |
reviewers = reviewers.map(reviewer => reviewer === author ? 'mikyung-lee' : reviewer); | |
else { | |
reviewers = reviewers.filter(reviewer => reviewer !== author); | |
} | |
} | |
await github.rest.pulls.requestReviewers({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.payload.pull_request.number, | |
reviewers: reviewers | |
}); | |
- name: Assign PR author and reviewers | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const assignees = ['mikyung-lee', 'yoongyu-lee']; // assignees | |
await github.rest.issues.addAssignees({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.pull_request.number, | |
assignees: assignees | |
}); |