You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(percy): drop unused fetchPercyToken calls in setup paths
The token was fetched server-side then discarded (replaced with
placeholder instructions). Removing the dead fetch in runPercyScan
and setUpPercyHandler eliminates a wasted API call per setup, drops
the void percyToken; smell from the SDK handlers, and removes the
last code path that sent privileged credentials across the function
boundary just to throw them away. fetchPercyToken stays for
fetchPercyChanges, which still uses it for legitimate server-side
calls. Setup instructions now point users at .env or shell export.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@@ -58,11 +50,13 @@ export async function runPercyScan(
58
50
}
59
51
60
52
functiongeneratePercyTokenInstructions(): string{
61
-
return`Set the PERCY_TOKEN environment variable for your project. Retrieve your project's token from the Percy dashboard (https://percy.io → Project Settings → Project Token), then export it locally — do not paste it into chat or commit it:
53
+
return`Set the PERCY_TOKEN environment variable for your project. Retrieve your project's token from the Percy dashboard (https://percy.io → Project Settings → Project Token) and add it to your project's .env file (PERCY_TOKEN=<your Percy project token>) or export it in your shell:
@@ -28,7 +25,7 @@ export function runPercyAutomateOnly(
28
25
steps.push({
29
26
type: "instruction",
30
27
title: "Set Percy Token in Environment",
31
-
content: `Retrieve your project's token from the Percy dashboard (https://percy.io → Project Settings → Project Token), then set PERCY_TOKENin your environment (e.g. export PERCY_TOKEN="<your Percy project token>"). Do not paste the token into chat or commit it.`,
28
+
content: `Retrieve your project's token from the Percy dashboard (https://percy.io → Project Settings → Project Token) and add it to your project's .env file (PERCY_TOKEN=<your Percy project token>) or export it in your shell (e.g. export PERCY_TOKEN="<your Percy project token>"). Do not paste the token into chat or commit it.`,
content: `Retrieve your project's token from the Percy dashboard (https://percy.io → Project Settings → Project Token), then set it locally:
34
+
content: `Retrieve your project's token from the Percy dashboard (https://percy.io → Project Settings → Project Token) and add it to your project's .env file (PERCY_TOKEN=<your Percy project token>) or export it in your shell:
0 commit comments