-
Notifications
You must be signed in to change notification settings - Fork 4
feat : 디스코드 webhook + 클로드.md 추가 #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
25171b8
🔥 불필요한 레거시 파일 삭제
manNomi 67b98ba
✨ PR 라벨 알림 워크플로우 추가
manNomi 492f80c
📝 커밋 룰 문서 추가
manNomi c79ab76
🔧 클로드.md 린트 제외 설정 추가
manNomi 55fa6f5
✨ Discord 역할 멘션 및 봇 이름 설정 추가
manNomi 780f1c8
🔒 하드코딩된 Discord 웹훅 URL 제거 및 보안 강화
manNomi 1eec0b0
🔒 GitHub context 주입 취약점 수정 (command injection 방지)
manNomi fd87bbb
🔒 jq를 사용한 안전한 JSON 생성으로 injection 공격 방지
manNomi b76248d
🎨 클로드.md 포맷 정리
manNomi 12ee0b2
🔒 pull_request_target으로 변경 및 CODEOWNERS 보안 체크 추가
manNomi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 클로드.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: PR Label Notify | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [labeled] | ||
| repository_dispatch: | ||
| types: [pr_notify] | ||
|
|
||
| jobs: | ||
| notify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Send Discord notification for PR label | ||
| if: github.event_name == 'pull_request' && github.event.label.name == 'need_review' | ||
| env: | ||
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL || 'https://discord.com/api/webhooks/1457757557438550177/8WvnhSLYFfxGRpsDD_ExCONT41dNKhpxw78D6m66nxEkwVMsuTdXifHQXm0JT4Z7dNp2' }} | ||
| run: | | ||
| PR_NUMBER="${{ github.event.pull_request.number }}" | ||
| PR_TITLE="${{ github.event.pull_request.title }}" | ||
| PR_AUTHOR="${{ github.event.pull_request.user.login }}" | ||
| PR_URL="${{ github.event.pull_request.html_url }}" | ||
| REPO_NAME="${{ github.repository }}" | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| curl -X POST "$DISCORD_WEBHOOK_URL" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "username": "프론트 PR 리뷰봇", | ||
| "avatar_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", | ||
| "content": "리뷰가 필요합니다! <@&1368737911301865503>", | ||
| "embeds": [{ | ||
| "title": "PR #'"$PR_NUMBER"': '"$PR_TITLE"'", | ||
| "description": "리뷰 요청이 있습니다", | ||
| "url": "'"$PR_URL"'", | ||
| "color": 3447003, | ||
| "fields": [ | ||
| { | ||
| "name": "작성자", | ||
| "value": "'"$PR_AUTHOR"'", | ||
| "inline": true | ||
| }, | ||
| { | ||
| "name": "저장소", | ||
| "value": "'"$REPO_NAME"'", | ||
| "inline": true | ||
| } | ||
| ], | ||
| "footer": { | ||
| "text": "GitHub Actions" | ||
| }, | ||
| "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" | ||
| }], | ||
| "allowed_mentions": { | ||
| "roles": ["1368737911301865503"] | ||
| } | ||
| }' | ||
|
|
||
| - name: Send Discord notification for webhook | ||
| if: github.event_name == 'repository_dispatch' | ||
| env: | ||
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL || 'https://discord.com/api/webhooks/1457757557438550177/8WvnhSLYFfxGRpsDD_ExCONT41dNKhpxw78D6m66nxEkwVMsuTdXifHQXm0JT4Z7dNp2' }} | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| run: | | ||
| MESSAGE="${{ github.event.client_payload.message || '리뷰가 필요합니다! <@&1368737911301865503>' }}" | ||
|
|
||
| curl -X POST "$DISCORD_WEBHOOK_URL" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "username": "프론트 PR 리뷰봇", | ||
| "avatar_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", | ||
| "content": "'"$MESSAGE"'", | ||
| "allowed_mentions": { | ||
| "roles": ["1368737911301865503"] | ||
| } | ||
| }' | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.