Skip to content

Commit 0dc41ce

Browse files
feildmasterclaude
andcommitted
fix: keep the workflow token off gist requests
The GITHUB_TOKEN of a workflow is an integration token, and the gists API answers 403 to those, so every gist plugin failed the install link check. Gist requests now go out unauthenticated; everything else on api.github.com still carries the token. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 1b7e2cf commit 0dc41ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/plugins.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export async function check(text, { network = true } = {}) {
170170

171171
function authenticate(token) {
172172
axios.interceptors.request.use((config) => {
173-
if (config.url?.startsWith('https://api.github.com/')) {
173+
if (config.url?.startsWith('https://api.github.com/') && !config.url.startsWith('https://api.github.com/gists/')) {
174174
config.headers.Authorization = `Bearer ${token}`;
175175
}
176176
return config;

0 commit comments

Comments
 (0)