[BE] 투두 웹소켓으로 이전 #36
Workflow file for this run
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
name: review_request | |
on: | |
pull_request: | |
branches: [ "BE/dev", "BE/test", "production" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract receiver list | |
id: extract_receiver_list | |
uses: actions/[email protected] | |
with: | |
script: | | |
const excludeMember = context.payload.pull_request.user.login; | |
const members = JSON.parse(${{secrets.DISCORD_BE}}); | |
const requester = members.find(entry => entry.github === excludeMember); | |
let outputString = ''; | |
for (const member of members) { | |
if ((member.github !== excludeMember)) { | |
outputString += `<@${member.discord}> `; | |
} | |
} | |
console.log(`::set-output name=names::${outputString.trim()}`); | |
console.log(`::set-output name=requester::${requester.name}`); | |
- name: Discord Message | |
uses: discord-actions/message@v2 | |
with: | |
webhookUrl: https://discord.com/api/webhooks/1326090386669572127/_ccJi99YPqQGq-es7-52RVHDzvbKOUz4fD9B-k8sCN1OKtDGOfcX5bPBbijS-lfjsn5- | |
message: "👑${{steps.extract_receiver_list.outputs.requester}}👑 PR이 도착했습니다. \n↓↓↓\n\n⚡⚡⚡⚡⚡⚡⚡⚡⚡\n*⚡[${{steps.extract_receiver_list.outputs.requester}}](${{github.event.pull_request.html_url}}) 혼구멍 내러가기~>⚡* \n⚡⚡⚡⚡⚡⚡⚡⚡⚡\n\n _혼내줄 사람들: ${{steps.extract_receiver_list.outputs.names}}_ \n" |