Skip to content

Commit

Permalink
Add action to automatically format Pixeebot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella committed Mar 14, 2024
1 parent 567c0bc commit eed3bd8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/autoformat-pixeebot-prs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Format Pixeebot PRs

on:
pull_request:
types: [opened, synchronize]

jobs:
apply-black:
if: github.event.pull_request.user.login == 'pixeebot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install black
run: pip install black

- name: Apply black formatting
run: black .

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ":art: Apply formatting"

0 comments on commit eed3bd8

Please sign in to comment.