Skip to content

Commit ecdba61

Browse files
authored
Merge pull request #13 from EnderModuBot/bug/12-workflow-error-end
wechsel auf das issue erstellen von https://github.com/Endkind/papermc
2 parents 287d216 + e5141f0 commit ecdba61

2 files changed

Lines changed: 22 additions & 11 deletions

File tree

.github/setup-reminder.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: ⚙️ Please complete repository setup
3+
labels: maintenance
4+
---
5+
6+
Please go to [repository settings](https://github.com/{{owner}}/{{repo}}/settings#merge-button-settings) and configure the following:
7+
8+
- [ ] Automatically delete head branches
9+
- [ ] Allow auto-merge

.github/workflows/setup.yml

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

24-
- name: Create issue to enable repository merge settings
24+
- name: Replace placeholders in issue template
25+
env:
26+
OWNER: ${{ github.repository_owner }}
27+
REPO: ${{ github.event.repository.name }}
2528
run: |
26-
owner_repo="${{ github.repository }}"
27-
issue_title="Enable repository merge settings"
28-
issue_body=$(
29-
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"
30-
)
29+
sed -i "s|{{owner}}|$OWNER|g" .github/setup-reminder.md
30+
sed -i "s|{{repo}}|$REPO|g" .github/setup-reminder.md
31+
32+
- name: Create setup reminder issue
33+
uses: JasonEtco/create-an-issue@v2
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
filename: .github/setup-reminder.md
3138

32-
curl -s -X POST \
33-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
34-
-H "Accept: application/vnd.github+json" \
35-
-d "{\"title\":\"$issue_title\",\"body\":\"$issue_body\"}" \
36-
"https://api.github.com/repos/${owner_repo}/issues"
3739
- name: Create / update default issue labels
3840
shell: bash
3941
run: |

0 commit comments

Comments
 (0)