Skip to content

Commit

Permalink
[ENV][Feat] #1 : auto-assign-reviewers 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
effozen committed Nov 6, 2024
1 parent 0cdfb85 commit 4219806
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/auto-assign-reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@ jobs:
uses: actions/github-script@v6
with:
script: |
await github.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
assignees: [context.payload.pull_request.user.login],
});
if (context.payload.pull_request) {
await github.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
assignees: [context.payload.pull_request.user.login],
});
} else {
console.log('No pull_request data found in context.payload');
}
- name: 'Add "확인 요청" Label if not present'
uses: actions/github-script@v6
id: label_check
with:
script: |
const labels = context.payload.pull_request.labels;
const labels = context.payload.pull_request.labels || [];
if (!labels.some(label => label.name === '확인 요청')) {
await github.issues.addLabels({
owner: context.repo.owner,
Expand Down

0 comments on commit 4219806

Please sign in to comment.