Skip to content

Commit

Permalink
ci: stylua check instead of formatting; tweak pr title and stale bot
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 17, 2024
1 parent d9c53d1 commit c61aca1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
name: Ensure Conventional Commits-like PR titles
name: PR title

on:
pull_request_target:
types: [opened, edited, synchronize]
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review

permissions:
pull-requests: read

jobs:
semantic-pull-request:
name: Validate PR title
name: Check PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
# add `improv` to the list of allowed types
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
requireScope: false
subjectPattern: ^(?![A-Z]).+$ # disallow title starting with capital
types: | # add `improv` to the list of allowed types
improv
fix
feat
Expand All @@ -29,5 +37,3 @@ jobs:
docs
break
revert
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Close stale issues and PRs"
name: Stale bot
on:
schedule:
- cron: "18 04 * * 3"
Expand All @@ -11,13 +11,13 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close Stale Issues
- name: Close stale issues
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

# DOCS https://github.com/actions/stale?tab=readme-ov-file#all-options
days-before-stale: 180 # ~6 months
# DOCS https://github.com/actions/stale#all-options
days-before-stale: 180
days-before-close: 7
stale-issue-label: "Stale"
stale-issue-message: |
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/stylua.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
name: Format with Stylua
name: Stylua check

on:
push:
branches: [main]
paths: ["**.lua"]

permissions:
contents: write
pull_request:

jobs:
postprocessing:
stylua:
name: Stylua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: .
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: auto-format with stylua"
args: --check .

0 comments on commit c61aca1

Please sign in to comment.