Skip to content

Commit

Permalink
use basic formatting gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebPena committed May 7, 2024
1 parent d6b2222 commit dd6b13a
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,10 @@ name: black-action
on: [push, pull_request]
jobs:
linter_name:
name: runner / black
name: runner / black formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
- uses: rickstaa/action-black@v1
with:
black_args: "."
- name: Create Pull Request
if: steps.action_black.outputs.is_formatted == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Format Python code with psf/black push"
commit-message: ":art: Format Python code with psf/black"
body: |
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix these issues.
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
branch: actions/black
black_args: ". --check"

0 comments on commit dd6b13a

Please sign in to comment.