-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Conflict 발생 시와 PR/Issue 생성, 수정, 닫힘 이벤트에 대한 디스코드 알림 Actions 추가
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,36 @@ | ||
name: PR and Issue Event Notifications | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, closed, synchronize] | ||
issues: | ||
types: [opened, edited, closed] | ||
|
||
jobs: | ||
notify-discord: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Notify Discord on PR/Issue Events | ||
uses: johnnyhuy/actions-discord-git-webhook@main | ||
with: | ||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }} | ||
args: | | ||
👾 **GitHub 이벤트 발생** 👾 | ||
**Event**: ${{ github.event_name }} | ||
**Action**: ${{ github.event.action }} | ||
**Repository**: ${{ github.repository }} | ||
**Actor**: ${{ github.actor }} | ||
**Title**: ${{ github.event.pull_request.title || github.event.issue.title }} | ||
**Link**: ${{ github.event.pull_request.html_url || github.event.issue.html_url }} | ||
--- | ||
🕒 **Timestamp**: ${{ github.event.pull_request.updated_at || github.event.issue.updated_at }} | ||
- name: Notify Discord on Conflict in Pull Requests | ||
if: ${{ github.event_name == 'pull_request' && github.event.action == 'synchronize' }} | ||
run: | | ||
curl -X POST -H "Content-Type: application/json" \ | ||
-d '{ | ||
"content": "🚨 **PR Conflict 발생** 🚨\n\n**PR Title**: '${{ github.event.pull_request.title }}'\n**Branch**: '${{ github.event.pull_request.head.ref }}'\n**URL**: '${{ github.event.pull_request.html_url }}'" | ||
}' \ | ||
${{ secrets.DISCORD_WEBHOOK }} |