Files
market/.github/workflows
mashagua f6d1eccf70 fix(ci): switch pull_request_target workflows to pull_request (#432)
GitHub now restricts `pull_request_target` on public repositories by
default, causing `i18n Auto-Translate` (required `translate` check) and
`Auto-request Copilot review` to fail immediately with
`startup_failure`.

### Changes
- **`.github/workflows/i18n-translate.yml`**:
  - Switch trigger from `pull_request_target` to `pull_request`.
- Explicitly check out `github.base_ref` on `pull_request` and keep the
data-only overlay model (`skills/`, `manifest.json`, `categories.json`,
symlink removal) so untrusted PR scripts are never executed.
- Gate auto-translate, push, PR comment, and failure-label steps to
same-repo PRs (`github.event.pull_request.head.repo.full_name ==
github.repository`) so fork PRs (which receive read-only tokens under
`pull_request`) run `translate.py --check` and fail cleanly with local
translation instructions instead of crashing with 403.
- **`.github/workflows/auto-request-copilot-review.yml`**:
- Switch trigger from `pull_request_target` to `pull_request` (keeping
`opened`, `reopened`, `ready_for_review`).
- Guard the `request` job to non-draft same-repo PRs so fork PRs do not
fail with 403.
- **`scripts/catalog/test_review_workflow.py`**:
- Update assertions to require `pull_request` (and reject
`pull_request_target`) plus verify the non-draft & same-repo job guard
while preserving all no-checkout/no-code-execution assertions.

### Verification
- `uv run --offline --quiet scripts/catalog/test_review_workflow.py` —
passed
- `pytest scripts/catalog/test_tracked_updates.py -q` — 64 passed
- `uv run --offline --quiet scripts/i18n/validate-i18n.py` — passed
- `uv run --offline --quiet scripts/catalog/validate_catalog_metadata.py
--require-complete` — 0 errors
2026-12-03 21:19:29 +08:00
..