Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit b1e884f

Browse files
committed
ci: stylua check instead of formatting; tweak pr title and stale bot
1 parent 75fc7bd commit b1e884f

File tree

3 files changed

+45
-16
lines changed

3 files changed

+45
-16
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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Stale bot
2+
on:
3+
schedule:
4+
- cron: "18 04 * * 3"
5+
6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
10+
jobs:
11+
stale:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Close stale issues
15+
uses: actions/stale@v9
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
# DOCS https://github.com/actions/stale#all-options
20+
days-before-stale: 180
21+
days-before-close: 7
22+
stale-issue-label: "Stale"
23+
stale-issue-message: |
24+
This issue has been automatically marked as stale.
25+
**If this issue is still affecting you, please leave any comment**, for example "bump", and it will be kept open.
26+
close-issue-message: |
27+
This issue has been closed due to inactivity, and will not be monitored.

.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)