Skip to content

[BE] 백엔드 코드 변경 사항 #5

[BE] 백엔드 코드 변경 사항

[BE] 백엔드 코드 변경 사항 #5

name: review_request
on:
pull_request:
branches: [ "FE/dev", "FE/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_FE}});
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/1326507349841809520/WD7X1LxAckgK1z2_2qQ1qvSGx3719XwkXocV_oNz8pmVMgJvDO2znJAWmVhSToM_wjBo
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"