Skip to content

[FE] Canvas λ¦¬νŒ©ν† λ§ #185

[FE] Canvas λ¦¬νŒ©ν† λ§

[FE] Canvas λ¦¬νŒ©ν† λ§ #185

Workflow file for this run

name: Auto Assign Reviewers and Assignee
on:
pull_request:
types: [opened]
jobs:
auto-assign:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Auto assign reviewers and assignee
uses: actions/github-script@v7
with:
script: |
const prAuthor = context.actor;
const pr = context.payload.pull_request;
const reviewersMap = {
'ChaJiTae': ['KimDwDev', 'chamny20', 'tjsdn052', 'seorang42'],
'KimDwDev': ['ChaJiTae', 'chamny20', 'tjsdn052', 'seorang42'],
'chamny20': ['ChaJiTae', 'KimDwDev', 'tjsdn052', 'seorang42'],
'tjsdn052': ['ChaJiTae', 'KimDwDev', 'chamny20', 'seorang42'],
'seorang42': ['ChaJiTae', 'KimDwDev', 'chamny20','tjsdn052']
};
const reviewers = reviewersMap[prAuthor] || ['ChaJiTae', 'KimDwDev', 'chamny20', 'tjsdn052', 'seorang42'].filter(r => r !== prAuthor);
console.log(`PR Author: ${prAuthor}`);
console.log(`Assigned reviewers: ${reviewers.join(', ')}`);
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
reviewers
});
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
assignees: [prAuthor]
});