Skip to content

Commit

Permalink
Add Github lint action when comment is made
Browse files Browse the repository at this point in the history
  • Loading branch information
AC-Dap committed Oct 8, 2023
1 parent aaf8139 commit 67991ae
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/black-code-formatter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Python Black Linter

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
lint:
Expand All @@ -11,3 +11,19 @@ jobs:
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.
contents: write
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Lint files
uses: psf/black@stable
with:
src: "./ersilia"
- name: Commit lint
uses: stefanzweifel/git-auto-commit-action@v5

0 comments on commit 67991ae

Please sign in to comment.