Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (22 loc) · 699 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 699 Bytes

Action-black

This Github Action performs a code reformatting using black on Pull requests. If a commit contains non-black formatted code, it will automatically run black and warn the user to do it beforehand.

screenshot_image

Usage

In /.github/workflows/example.yaml

name: Black
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  build:
    name: Code Formatter
    runs-on: ubuntu-latest
    steps:
    - name: Code Formatter
      uses: Unholster/action-black@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        BLACK_ARGS: "."