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

Latest commit

 

History

History
25 lines (20 loc) · 648 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 648 Bytes

action-yapf

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

Screenshot

Usage

In /.github/workflows/example.yaml

name: Yapf Formatter
on:
  pull_request:
    types: [opened, synchronize, reopened]

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