Skip to content

stats documentation #74

stats documentation

stats documentation #74

name: Python Black Linter
on:
pull_request:
issue_comment:
types: [ created, edited ]
jobs:
lint:
if: ${{ !contains(github.event_name, 'issue_comment') }} # Don't want to trigger on comments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check"
src: "./ersilia"
comment-lint:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '✨') }}
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
issues: read
pull-requests: read
contents: write
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: Checkout branch
uses: actions/checkout@v3
if: success()
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Lint files
uses: psf/black@stable
with:
options: ""
src: "./ersilia"
- name: Commit lint
uses: stefanzweifel/git-auto-commit-action@v5