Skip to content

[Bug] 닉네임 변경없는 유저 수정 시 중복 발생 #201

[Bug] 닉네임 변경없는 유저 수정 시 중복 발생

[Bug] 닉네임 변경없는 유저 수정 시 중복 발생 #201

name: Notify Discord of GitHub activity
on:
discussion:
types: [ created, answered ]
discussion_comment:
pull_request:
types: [ opened, reopened, closed ]
branches: [ main, dev ]
issue_comment:
types: [ created ]
issues:
types: [ opened, deleted, closed, reopened ]
release:
types: [ published ]
# Add other events here that you want to trigger the workflow on
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
- name: Install dependencies
run: pip install requests
- name: Process webhook payload and notify Discord
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
payload=$(cat $GITHUB_EVENT_PATH)
event_type=$(jq -r ".\"${{ github.event_name }}\"" <<< $payload)
repository_name=$(jq -r '.repository.name' <<< $payload)
sender_username=$(jq -r '.sender.login' <<< $payload)
message="New event on $repository_name by $sender_username! <@&1048243413033697310>"
payload=$(jq --arg message "$message" '. + {content: $message}' <<< $payload)
curl -H "Content-Type: application/json" -X POST -d "$payload" $DISCORD_WEBHOOK_URL