eficode/robotframework-oxygen

Auto formatting with Black

matejc opened this issue · 0 comments

When we have Github Actions PR merged, we might look into Black for automatic code formatting.

We might use something of a sort (not tested):

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
            # hack, so that git-auto-commit-action@v4 works with checkout@v2
            ref: ${{ github.head_ref }}
      - uses: psf/black@stable
        with:
          # overwrite options so that it does not do check-only
          options: "--verbose"
      - name: Commit black formatting results
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
            commit_message: "Format Python code with psf/black push"