Skip to content

Commit 881aaee

Browse files
authored
Merge pull request #7 from EnderModuBot/feat/4-die-labels-müssen-auch-noch-erstellt-werden-end
chore: update workflow to create an issue for enabling branch auto-de…
2 parents 01e5d5e + 21780c1 commit 881aaee

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/setup.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ jobs:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
2323

24-
- name: Enable branch auto-deletion
24+
- name: Create issue to enable branch auto-deletion
2525
run: |
26-
curl -s -X PATCH "https://api.github.com/repos/${{ github.repository }}" \
27-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
28-
-H "Accept: application/vnd.github+json" \
29-
-d '{"delete_branch_on_merge":true}'
26+
owner_repo="${{ github.repository }}"
27+
issue_title="Enable 'Automatically delete head branches' setting"
28+
issue_body="Please go to [repository settings](https://github.com/${owner_repo}/settings#merge-button-settings) and enable **Automatically delete head branches**."
29+
30+
curl -s -X POST \
31+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
32+
-H "Accept: application/vnd.github+json" \
33+
-d "{\"title\":\"${issue_title}\",\"body\":\"${issue_body}\"}" \
34+
"https://api.github.com/repos/${owner_repo}/issues"
3035
3136
- name: Create / update default issue labels
3237
shell: bash

0 commit comments

Comments
 (0)