Skip PR preview deploy for fork pull requests - #87
Conversation
rossjrw/pr-preview-action v1 does not support fork PRs: the GITHUB_TOKEN issued for pull_request events from forks is read-only and cannot push to gh-pages, so the deploy step always fails with a 403 for those PRs (e.g. PR #77 from imelainew's fork). Skip the whole job when the PR head repo isn't this repo instead of failing CI.
|
|
The The Generated by Claude Code |
Quarto only WARNs when a listing's contents entry doesn't match any file, so a typo'd or missing path (e.g. team.qmd referencing a bio file that was never added in the right location) silently drops that entry from the rendered page instead of failing CI. Replace the quarto-actions/render step with an equivalent inline render that greps for that warning and fails the build when found.
|
The new This is a pre-existing content issue already on I'm holding off on changing Generated by Claude Code |
|
Pushed a follow-up commit disabling the broken Remaining Generated by Claude Code |
…-workflow-fix-2o9p5p
|
Update: merged All checks are green on the current commit: Generated by Claude Code |
|
Correction — #91's fix did not actually resolve this. This run (commit That's more denials than the pre-fix run had (17 vs. 8), and still zero My guess: this repository (or org) likely has Settings → Actions → General → Workflow permissions set to "Read repository contents permission" (read-only) as the default. That setting acts as a hard ceiling — a workflow's own Could someone with admin access check that setting? If it's set to read-only, flipping it to "Read and write permissions" (the repo-wide default, not a per-workflow override) should be the actual fix — at which point #91's Generated by Claude Code |
|
Correction #2 — my "org default Workflow permissions" theory was wrong too (repo Settings → Actions confirms "Read and write permissions" is already the default). Different root cause, and this time I have solid evidence for it.
Neither is in Claude Code's default allowed-tools set for a non-interactive run, so every attempt to call them is auto-denied (no human present to approve the prompt) — that's what The workflow file already has the fix half-written as a dead comment: # claude_args: '--allowed-tools Bash(gh pr *)'Opening a PR that uncomments/extends this to cover both tools the plugin actually calls. Generated by Claude Code |
|
Progress update on this run (commit The action hides Claude's detailed tool-call stream by default ("full output hidden for security"), so I can't see which specific call is still being denied from the log alone — I only get the count. Rather than guess a third time, opening a small diagnostic PR to set Generated by Claude Code |
…-workflow-fix-2o9p5p
|
Diagnosis complete, thanks to #93's verbose log. The narrow Generated by Claude Code |
…-workflow-fix-2o9p5p
|
This run (commit Still zero comments here, but I think that's because this specific PR is a small, workflow-only YAML diff — the plugin's own step 1 explicitly tells it to skip PRs that are "trivial" or "obviously correct" without commenting. So the silence here is plausibly the plugin working as designed, not still broken. I don't want to keep re-enabling Generated by Claude Code |
team.qmd's postdocs listing expects people/ekamau/bio-ekamau.qmd (the convention every other team member follows: a per-person folder containing the bio and its image). The added files were at the repo root instead, so Quarto's listing silently dropped the entry - team.html never showed Everlyn. Move both files into people/ekamau/, rename the photo to match the bio's `image: ekamau.jpg`, and restore the postdocs listing in team.qmd (disabled in #87 while this was broken). Verified locally: quarto render team.qmd now produces no unmatched- listing warning, and the rendered team.html includes Everlyn's entry.
The code-review plugin gates all posting on a --comment argument: "If --comment argument was NOT provided, stop here. Do not post any GitHub comments." (step 7 of plugins/code-review/commands/code-review.md in anthropics/claude-code.) We have never passed it, so every review this repo has run has been working as designed -- reviewing, printing to the job log, and posting nothing behind a green check. claude has zero review comments across UCD-SERG#78, UCD-SERG#79, UCD-SERG#80, UCD-SERG#86, UCD-SERG#87, UCD-SERG#92, UCD-SERG#93 and UCD-SERG#94. This was not a permissions problem. UCD-SERG#91's pull-requests: write and UCD-SERG#92/UCD-SERG#94's allowlist work were treating a symptom. Closes UCD-SERG#96 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMmB6db4xpbuqcqaQKArZb
Summary
Quarto Previewjob on PR Add Elaine Wang profile to team page #77 (https://github.com/UCD-SERG/ucd-serg.github.io/actions/runs/30663427667/job/91264763960?pr=77)Deploy PR Previewstep (rossjrw/pr-preview-action@main) failed with:imelainew/ucd-serg.github.io). Forpull_requestevents from forks, GitHub always issues a read-onlyGITHUB_TOKEN, no matter whatpermissions:the workflow declares.rossjrw/pr-preview-action's current major version explicitly does not support fork PRs ("will do so in the upcoming v2"), so the deploy step can never succeed for a forked PR — it will always 403.build-deployjob entirely when the PR's head repo isn't this repo, so forked-PR CI shows as skipped/neutral instead of a hard failure. Same-repo branch PRs (the common case here) are unaffected.Also investigated
Per the same request, looked into why https://ucd-serg.github.io/pr-preview/pr-86/team.html doesn't show Everlyn Kamau (PR #86). That's a separate, unrelated content issue in PR #86's branch (
ekamau-patch-2), not touched by this PR — reported separately in chat.Test plan
Generated by Claude Code