Skip to content

Commit

Permalink
chore: add comments on pr suggesting formatting
Browse files Browse the repository at this point in the history
This commit adds a step to the lua-format-check-pr job that will leave a
comment with "suggested changes" when formatting needs to be applied.
This can then be applied with one click (per file).

Alternatively, I could change it to automattically add a commit that
formats the code. Several PRs have gotten through without proper
formatting, which makes all future PRs fail the checks.
  • Loading branch information
aarondill committed Jul 22, 2024
1 parent 835334b commit f7c77a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lua-format-check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
pull_request:
paths:
- "**.lua"
permissions:
contents: read
checks: write
issues: write
pull-requests: write
jobs:
format_code:
runs-on: ubuntu-latest
Expand All @@ -13,3 +18,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
- name: suggester
uses: reviewdog/action-suggester@v1
with:
tool_name: stylua

0 comments on commit f7c77a9

Please sign in to comment.