Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Allows us to trigger auto-formatting by adding a comment with the body
# `!format` to a pull request. It will run the formatter and create a commit if
# there are any changes.

on: issue_comment
jobs:
auto-format:
name: formatting
if: ${{ github.event.issue.pull_request && github.event.comment.body == "!format" }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: install dprint
run: |
cargo install --locked [email protected]

- name: format the code
run: |
dprint fmt

- name: commit any changes
uses: stefanzweifel/[email protected]
with:
commit_author: "Format Prose Bot <[email protected]>"
commit_message: "🤖 dprint fmt"
commit_user_email: "[email protected]"
commit_user_name: "Format Prose Bot"
Loading