Skip to content

Commit 6201d83

Browse files
committed
ci: stylua check instead of formatting; tweak pr title and stale bot
1 parent 3462d1c commit 6201d83

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
name: Ensure Conventional Commits-like PR titles
1+
name: PR title
22

33
on:
44
pull_request_target:
5-
types: [opened, edited, synchronize]
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- reopened
10+
- ready_for_review
611

712
permissions:
813
pull-requests: read
914

1015
jobs:
1116
semantic-pull-request:
12-
name: Validate PR title
17+
name: Check PR title
1318
runs-on: ubuntu-latest
1419
steps:
1520
- uses: amannn/action-semantic-pull-request@v5
16-
# add `improv` to the list of allowed types
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1723
with:
18-
types: |
24+
requireScope: false
25+
subjectPattern: ^(?![A-Z]).+$ # disallow title starting with capital
26+
types: | # add `improv` to the list of allowed types
1927
improv
2028
fix
2129
feat
@@ -29,5 +37,3 @@ jobs:
2937
docs
3038
break
3139
revert
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale-bot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Close stale issues and PRs"
1+
name: Stale bot
22
on:
33
schedule:
44
- cron: "18 04 * * 3"
@@ -11,13 +11,13 @@ jobs:
1111
stale:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Close Stale Issues
14+
- name: Close stale issues
1515
uses: actions/stale@v9
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818

19-
# DOCS https://github.com/actions/stale?tab=readme-ov-file#all-options
20-
days-before-stale: 180 # ~6 months
19+
# DOCS https://github.com/actions/stale#all-options
20+
days-before-stale: 180
2121
days-before-close: 7
2222
stale-issue-label: "Stale"
2323
stale-issue-message: |

.github/workflows/stylua.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
name: Format with Stylua
1+
name: Stylua check
22

33
on:
44
push:
55
branches: [main]
66
paths: ["**.lua"]
7-
8-
permissions:
9-
contents: write
7+
pull_request:
108

119
jobs:
12-
postprocessing:
10+
stylua:
11+
name: Stylua
1312
runs-on: ubuntu-latest
1413
steps:
1514
- uses: actions/checkout@v4
1615
- uses: JohnnyMorganz/stylua-action@v4
1716
with:
1817
token: ${{ secrets.GITHUB_TOKEN }}
1918
version: latest
20-
args: .
21-
- uses: stefanzweifel/git-auto-commit-action@v5
22-
with:
23-
commit_message: "style: auto-format with stylua"
19+
args: --check .

0 commit comments

Comments
 (0)