Skip to content

Commit

Permalink
fixed multiline description add-playlist-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark-Kernel authored Nov 24, 2024
1 parent b2778d4 commit 666dc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/add-playlist-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
BODY="$ISSUE_BODY"
PLAYLIST_TITLE=$(echo "$BODY" | grep "### Playlist Title" -A 2 | tail -n 1)
PLAYLIST_URL=$(echo "$BODY" | grep "### YouTube Playlist URL" -A 2 | tail -n 1)
PLAYLIST_SUMMARY=$(echo "$BODY" | grep "### Playlist Summary" -A 2 | tail -n 1)
PLAYLIST_SUMMARY=$(echo "$BODY" | sed -n '/### Playlist Summary/,/### Category/{//!p}' | sed '$d')
PLAYLIST_CATEGORY=$(echo "$BODY" | grep "Category" -A 2 | tail -n 1)
CREATOR="${{ github.event.issue.user.login }}"
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
# Create a pull request
pr_url="https://api.github.com/repos/${{github.repository}}/pulls"
pr_data=$(jq -n --arg title "Contribution from issue #$issue_number" \
--arg body "$(printf "### Description\n\nThis PR adds the contribution from issue #$issue_number.\n\n#### Playlist Details:\n\`\`\`json\n%s\n\`\`\`" "$(cat temp_playlist.json)")" \
--arg body "$(printf "### Description\n\nThis PR adds the contribution from issue #$issue_number by @%s.\n\n#### Playlist Details:\n\`\`\`json\n%s\n\`\`\`" "$CREATOR" "$(cat temp_playlist.json)")" \
--arg head "$branch_name" \
--arg base "main" \
'{title: $title, body: $body, head: $head, base: $base}')
Expand Down

0 comments on commit 666dc38

Please sign in to comment.