Skip to content

- test actions

- test actions #5

Workflow file for this run

name: Autoformat
on:
issue_comment:
types: [created, edited]
jobs:
auto-format:
# Check if the comment contains the trigger /format-action.
# Check if the comments come from pull request, exclude those from issue.
if: |
contains(github.event.comment.body, '/format-action') &&
contains(github.event.comment.html_url, '/pull/')
name: auto-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint with black
uses: psf/black@stable
with:
options: "--verbose"
src: "."
jupyter: true
- name: Push auto format changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Auto-format code with black performed by GitHub Action"
git push origin ${{ github.head_ref }}