Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

๐Ÿ™ˆ /.zed gitignore์— ์ถ”๊ฐ€ #29

๐Ÿ™ˆ /.zed gitignore์— ์ถ”๊ฐ€

๐Ÿ™ˆ /.zed gitignore์— ์ถ”๊ฐ€ #29

name: 'Random reviewer'
on:
pull_request:
types:
- opened
branches:
- '**'
jobs:
random-reviwer:
runs-on: ubuntu-latest
steps:
- id: random_reviwer
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const myId = '${{ github.event.pull_request.user.login }}';
const idList = ['yeolyi', 'Limchansol', 'goranikin', 'onemeee'];
const candidate = idList.filter(id => id !== myId);
const idx = Math.floor(Math.random() * candidate.length);
const randomReviewer = candidate[idx];
const deadline = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000);
const comment = `@${randomReviewer}๋‹˜ ${deadline.toLocaleDateString('ko-KR')}๊นŒ์ง€ ๋ฆฌ๋ทฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค ๐ŸŽ‰`
core.setOutput('comment', comment)
core.setOutput('reviewer', randomReviewer)
- name: comment PR
uses: mshick/add-pr-comment@v1
with:
message: |
${{ steps.random_reviwer.outputs.comment }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
- name: Add Pull Request Reviewer
uses: madrapps/add-reviewers@v1
with:
reviewers: ${{ steps.random_reviwer.outputs.reviewer }}
token: ${{ secrets.GITHUB_TOKEN }}