Skip to content

Commit d91ba58

Browse files
committed
fix(hooks): strip github: prefix from repository in update.mts
The repository values in external-tools.json include a github: prefix (e.g. "github:zizmorcore/zizmor") which was already stripped in index.mts but not in update.mts. This produced broken GitHub API calls and download URLs like "repos/github:zizmorcore/zizmor/releases/latest".
1 parent 1bc54fb commit d91ba58

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.claude/hooks/setup-security-tools/update.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async function updateZizmor(config: Config): Promise<UpdateResult> {
146146
return { tool, skipped: true, updated: false, reason: 'not in config' }
147147
}
148148

149-
const repo = toolConfig.repository ?? 'zizmorcore/zizmor'
149+
const repo = toolConfig.repository?.replace(/^github:/, '') ?? 'zizmorcore/zizmor'
150150

151151
let release: GhRelease
152152
try {
@@ -265,7 +265,7 @@ async function updateSfwTool(
265265
return { tool: toolName, skipped: true, updated: false, reason: 'not in config' }
266266
}
267267

268-
const repo = toolConfig.repository
268+
const repo = toolConfig.repository?.replace(/^github:/, '')
269269
if (!repo) {
270270
return { tool: toolName, skipped: true, updated: false, reason: 'no repository' }
271271
}

0 commit comments

Comments
 (0)