Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Fix github action that doesn't work with forked branches #815

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ jobs:
name: runner / ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout PR head
uses: actions/checkout@v3
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Checkout Repo
uses: actions/checkout@v3
if: github.event_name == 'workflow_dispatch'

- name: Check files using the ruff formatter
uses: chartboost/ruff-action@v1
id: ruff_formatter
with:
args: format

- name: Auto commit ruff formatting
uses: stefanzweifel/git-auto-commit-action@v5
with:
Expand Down