mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 17:40:09 +00:00
ci: fork-safe checkout for lint workflow (#5887)
Use conditional ref to support forks and avoid checkout failures. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5887-ci-fork-safe-checkout-for-lint-workflow-2806d73d36508139b9effa6d18e1cadb) by [Unito](https://www.unito.io)
This commit is contained in:
4
.github/workflows/lint-and-format.yaml
vendored
4
.github/workflows/lint-and-format.yaml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || github.ref }}
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
@@ -100,4 +100,4 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: '## ⚠️ Linting/Formatting Issues Found\n\nThis PR has linting or formatting issues that need to be fixed.\n\n**Since this PR is from a fork, auto-fix cannot be applied automatically.**\n\n### Option 1: Set up pre-commit hooks (recommended)\nRun this once to automatically format code on every commit:\n```bash\npnpm prepare\n```\n\n### Option 2: Fix manually\nRun these commands and push the changes:\n```bash\npnpm lint:fix\npnpm format\n```\n\nSee [CONTRIBUTING.md](https://github.com/Comfy-Org/ComfyUI_frontend/blob/main/CONTRIBUTING.md#git-pre-commit-hooks) for more details.'
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user