Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/Issue_Noti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
TITLE: ${{ github.event.issue.title }}
run: |
echo "AVATAR_URL=${{ secrets.DISCORD_AVATAR_URL }}" >> $GITHUB_ENV
echo "COMMENT_BODY=${{ github.event.issue.body }}" >> $GITHUB_ENV
echo "COMMENT_BODY=$(echo "${{ github.event.issue.body }}" | base64)" >> $GITHUB_ENV
echo "USERNAME=망곰" >> $GITHUB_ENV
echo "WEB_HOOK=${{ secrets.DISCORD_WEB_HOOK }}" >> $GITHUB_ENV

Expand All @@ -30,8 +30,9 @@ jobs:
WEB_HOOK: ${{ env.WEB_HOOK }}
run: |
if [ -n "$WEB_HOOK" ]; then
DECODED_COMMENT_BODY=$(echo "$COMMENT_BODY" | base64 --decode)
JSON_PAYLOAD=$(jq -n \
--arg comment_body "$COMMENT_BODY" \
--arg comment_body "$(echo "$DECODED_COMMENT_BODY" | jq -R @json)" \
--arg username "$USERNAME" \
--arg avatar_url "$AVATAR_URL" \
--arg issue_title "$ISSUE_TITLE" \
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/PR_Comment_Noti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set Environment Variables
run: |
echo "AVATAR_URL=${{ secrets.DISCORD_AVATAR_URL }}" >> $GITHUB_ENV
echo "COMMENT_BODY=$(echo '${{ github.event.comment.body }}' | jq -Rs .)" >> $GITHUB_ENV
echo "COMMENT_BODY=$(echo '${{ github.event.comment.body }}' | base64)" >> $GITHUB_ENV
echo "USERNAME=망곰" >> $GITHUB_ENV
echo "WEB_HOOK=${{ secrets.DISCORD_WEB_HOOK }}" >> $GITHUB_ENV

Expand All @@ -29,8 +29,9 @@ jobs:
WEB_HOOK: ${{ env.WEB_HOOK }}
run: |
if [ -n "$WEB_HOOK" ]; then
DECODED_COMMENT_BODY=$(echo "$COMMENT_BODY" | base64 --decode)
JSON_PAYLOAD=$(jq -n \
--arg comment_body "$COMMENT_BODY" \
--arg comment_body "$(echo "$DECODED_COMMENT_BODY" | jq -R @json)" \
--arg username "$USERNAME" \
--arg avatar_url "$AVATAR_URL" \
--arg pr_title "$PR_TITLE" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@ export default function TimerCreationContent({
const [minutes, setMinutes] = useState(initMinutes);
const [seconds, setSeconds] = useState(initSeconds);
const [speakerNumber, setSpeakerNumber] = useState<number | null>(
(beforeData?.speakerNumber ?? initData?.stance === 'NEUTRAL')
? null
: (initData?.speakerNumber ?? 1),
beforeData?.speakerNumber
? beforeData.speakerNumber
: initData
? initData.stance === 'NEUTRAL'
? null
: initData.speakerNumber
? initData.speakerNumber
: null
: 1,
);

const handleSubmit = () => {
Expand Down
Loading