robotframework-oxygen icon indicating copy to clipboard operation
robotframework-oxygen copied to clipboard

Auto formatting with Black

Open matejc opened this issue 2 years ago • 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"

matejc avatar Aug 17 '21 07:08 matejc