Skip to content

Commit

Permalink
feat: Lint Black Auto Correction for Remote Fork (#157)
Browse files Browse the repository at this point in the history
* feat: Lint Black Auto Correction for Remote Fork

* Update lint.yaml
  • Loading branch information
cdnninja authored Nov 19, 2021
1 parent 830f2b1 commit 0fd4583
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint

on:
pull_request:
pull_request_target:
branches:
- master

Expand All @@ -26,28 +26,19 @@ jobs:
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Set up Python
uses: actions/setup-python@v2
id: python
with:
python-version: "3.x"

- name: Install pre-commit
run: |
python3 -m pip install pre-commit
pre-commit install-hooks --config .github/pre-commit-config.yaml
- name: Run the check (${{ matrix.checks }})
run: pre-commit run --hook-stage manual ${{ matrix.checks }} --all-files --config .github/pre-commit-config.yaml
- name: Set Lint branch name
if: failure()
id: vars
run: echo ::set-output name=branch-name::"${{ matrix.checks }}/${{ github.head_ref }}"
- name: Create Pull Request
- name: Commit Changes
if: failure()
uses: peter-evans/create-pull-request@v3
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit-message: action fixes automatically created.
title: "fix: ${{ matrix.checks }} action"
body: This is an auto-generated PR with fixes by ${{ matrix.checks }}
branch: ${{ steps.vars.outputs.branch-name }}
commit_message: "fix: ${{ matrix.checks }} action"

0 comments on commit 0fd4583

Please sign in to comment.