Skip to content

Commit eec6912

Browse files
committed
fix issue templates and prettier
1 parent 3c0fe81 commit eec6912

4 files changed

Lines changed: 111 additions & 35 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Bug Report
2+
description: Tell us about a bug you found
3+
title: "[Bug] "
4+
labels:
5+
- "bug"
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: "Here is the thing. We need details to fix bugs. So here is what happened is what you tell us."
10+
- type: input
11+
id: mod_version
12+
attributes:
13+
label: Mod version
14+
description: What version of the mod are you using
15+
placeholder: Tell us the mod version
16+
validations:
17+
required: true
18+
- type: input
19+
id: game_version
20+
attributes:
21+
label: Game version
22+
description: What version of the game are you using
23+
placeholder: Tell us the game version
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: steps
28+
attributes:
29+
label: The Steps
30+
description: Tell us what to do to see the error.
31+
placeholder: "1. Open the game\n2. Do the action\n3. See the error"
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: expected
36+
attributes:
37+
label: What you expected
38+
description: "Tell us what should happen. This might work for you if you check your logs. Add photos if you have them."
39+
placeholder: Tell us what you see
40+
validations:
41+
required: true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature Request
2+
description: Tell us what new thing you want to add
3+
title: "[Feature] "
4+
labels:
5+
- "enhancement"
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: "This can help you and other players."
10+
- type: textarea
11+
id: idea
12+
attributes:
13+
label: Your Idea
14+
description: Explain your new idea here. Keep it simple.
15+
placeholder: Tell us your idea
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: importance
20+
attributes:
21+
label: Why it matters
22+
description: "Tell us why we need this in the game. And that is why it matters."
23+
placeholder: Explain why we need this
24+
validations:
25+
required: true

.github/workflows/prettier.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Prettier Autofix
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
prettier:
14+
if: github.actor != 'github-actions[bot]'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
27+
- name: Run Prettier
28+
run: npx prettier --write "**/*.{java,json,yml,yaml,properties}"
29+
continue-on-error: false
30+
31+
- name: Commit changes
32+
if: github.event_name == 'push'
33+
uses: stefanzweifel/git-auto-commit-action@v5
34+
with:
35+
commit_message: "chore: prettier formatting"
36+
37+
- name: Check for formatting changes
38+
if: github.event_name == 'pull_request'
39+
run: |
40+
if git diff --exit-code
41+
then
42+
echo "::notice::All files are properly formatted."
43+
else
44+
echo "::notice::Some files are correctly formatted and others are not. You may want to run prettier locally. This will also get auto fixed on commit."
45+
fi

0 commit comments

Comments
 (0)