From 4a1f6f25d7ee2e0e304fee821447d6f10c7bbc4e Mon Sep 17 00:00:00 2001 From: Endkind Date: Mon, 16 Jun 2025 15:13:22 +0200 Subject: [PATCH] fix: improve issue body formatting for repository merge settings --- .github/workflows/setup.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index f5b5b6f..906f9b0 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -25,17 +25,15 @@ jobs: run: | owner_repo="${{ github.repository }}" issue_title="Enable repository merge settings" - issue_body="Please go to [repository settings](https://github.com/${owner_repo}/settings#merge-button-settings) and configure the following:\n\n- [ ] Automatically delete head branches\n- [ ] Allow auto-merge" + issue_body=$( + echo -e "Please go to [repository settings](https://github.com/${owner_repo}/settings#merge-button-settings) and configure the following:\n\n- [ ] Automatically delete head branches\n- [ ] Allow auto-merge" + ) curl -s -X POST \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github+json" \ - -d "$(jq -n \ - --arg title "$issue_title" \ - --arg body "$issue_body" \ - '{title: $title, body: $body}')" \ + -d "{\"title\":\"$issue_title\",\"body\":\"$issue_body\"}" \ "https://api.github.com/repos/${owner_repo}/issues" - - name: Create / update default issue labels shell: bash run: |