Skip to content

ci: make PR checks fork-safe by dropping the unused chat-widget fetch - #824

Merged
khushalsonawat merged 1 commit into
devfrom
ci/fork-safe-pr-checks
Aug 18, 2026
Merged

ci: make PR checks fork-safe by dropping the unused chat-widget fetch#824
khushalsonawat merged 1 commit into
devfrom
ci/fork-safe-pr-checks

Conversation

@khushalsonawat

Copy link
Copy Markdown
Contributor

What

Removes the @futureagi/chat-widget fetch from CI and the vestigial dependency from package.json. The link-audit job now runs on bare Node with no secrets and no install; deploy loses two inert steps.

Why

PR #822 (an external contribution) failed the link audit before any checking ran: the job clones the private landing-page repo using secrets.GH_PAT, and GitHub withholds repository secrets from fork-PR runs, so the clone fails with exit 128. Every future external PR would fail the same way.

What cases were covered

  • @futureagi/chat-widget is imported nowhere in src, astro config, or plugins; package-lock.json contains zero references to it. AiChatWidget.astro is self-contained and talks to the docs-agent service over HTTP
  • Both audit scripts (audit-links.mjs, check-deleted-pages.mjs) import only Node built-ins (fs, path, child_process, url); ran both locally on a clean tree, both exit 0 with no node_modules involvement
  • deploy still runs npm install for the real build dependencies; only the fetch and patch steps are removed

How

Deleted the fetch/patch/cache/install steps from pr-checks.yml, the fetch/patch steps from deploy.yml, and the workspace dependency line from package.json.

Recording

Not applicable: CI-only change. Proof is #822's check going green on rerun once this merges.

🤖 Generated with Claude Code

- @futureagi/chat-widget is imported nowhere in the source and absent
  from package-lock.json; remove the vestigial workspace dependency
- pr-checks: the audit scripts use only Node built-ins, so drop the
  private-repo clone, the dependency patch and npm install entirely.
  Fork PRs never receive repo secrets, which is why every external
  contribution failed this check at the clone step
- deploy: drop the now-inert fetch and patch steps, removing the
  workflow's last dependence on the GH_PAT secret

Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
@khushalsonawat khushalsonawat self-assigned this Aug 18, 2026
@khushalsonawat
khushalsonawat merged commit c77dcf1 into dev Aug 18, 2026
1 check passed
@khushalsonawat
khushalsonawat deleted the ci/fork-safe-pr-checks branch August 18, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants