Skip to content

Commit

Permalink
chore: Disable fmt push on main (#14)
Browse files Browse the repository at this point in the history
* chore: removed fmt from main

* Allow linter to run on main, PR changes instead of direct push on main

* Fix linter errors
  • Loading branch information
kjy5 authored Mar 21, 2024
1 parent 41cdc61 commit 8f33c60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/autoformat-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ jobs:
run: hatch fmt -f

- name: ✅ Commit code format changes
if: github.ref != 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Autoformat code"
commit_message: "chore: Autoformat code"
skip_fetch: true
skip_checkout: true

- name: 📤 PR code format changes
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PR_TOKEN }}
commit-message: "Autoformat code"
title: "chore: Autoformat code"
branch: "autoformat-code"
delete-branch: true

- name: 🔍 Lint
run: hatch fmt --check
1 change: 1 addition & 0 deletions src/vbl_aquarium/models/urchin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from enum import Enum

from pydantic import Field

from vbl_aquarium.models.unity import Color, Vector2, Vector3
Expand Down

0 comments on commit 8f33c60

Please sign in to comment.