[7주차] 라우팅 및 컴포넌트 스타일링 #88
This file contains hidden or 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: Auto label by PR author | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened, synchronize] | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| label-by-author: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Add label by author | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const author = context.payload.pull_request.user.login; | |
| // GitHub ID -> [조 라벨, 이름 라벨] | |
| // 필요하면 아래에 계속 추가하면 됩니다. | |
| const map = { | |
| "evan7484": ["파트장", "최준서"], | |
| "woornjspractice" : ["2조", "권태우"], | |
| "leedongkyu0701": ["2조", "이동규"], | |
| "wooooyun": ["2조", "우윤제"], | |
| "kms0616" : ["2조", "김민서"], | |
| "junh0414" : ["2조", "김준호"], | |
| "sohyekim526" : ["1조", "김소혜"], | |
| "bucheasal" : ["1조", "이준우"], | |
| "ehdwls" : ["1조", "변동진"], | |
| "dkscoqlsdl" : ["1조", "안채빈"] | |
| }; | |
| const labels = [...new Set(map[author] || [])]; | |
| if (labels.length === 0) { | |
| core.info(`No mapped labels for ${author}`); | |
| return; | |
| } | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels | |
| }); |