diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index a06e28e..f5b5b6f 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -21,16 +21,19 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Create issue to enable branch auto-deletion + - name: Create issue to enable repository merge settings run: | owner_repo="${{ github.repository }}" - issue_title="Enable 'Automatically delete head branches' setting" - issue_body="Please go to [repository settings](https://github.com/${owner_repo}/settings#merge-button-settings) and enable **Automatically delete head branches**." + 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" curl -s -X POST \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github+json" \ - -d "{\"title\":\"${issue_title}\",\"body\":\"${issue_body}\"}" \ + -d "$(jq -n \ + --arg title "$issue_title" \ + --arg body "$issue_body" \ + '{title: $title, body: $body}')" \ "https://api.github.com/repos/${owner_repo}/issues" - name: Create / update default issue labels