[PR #22] [MERGED] fix: use path instead of url for skill metadata API call #216

Closed
opened 2026-02-15 17:16:19 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/clawhub/pull/22
Author: @daveonkels
Created: 1/19/2026
Status: Merged
Merged: 1/24/2026
Merged by: @steipete

Base: mainHead: fix/update-url-parsing


📝 Commits (1)

  • cbcba0c fix: use path instead of url for skill metadata API call

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/clawdhub/src/cli/commands/skills.ts (+1 -1)

📄 Description

Summary

  • Fixed URL parsing error in cmdUpdate when updating skills without local fingerprint match

Problem

Running clawdhub update --all fails with:

✖ Failed to parse URL from /api/v1/skills/clawd-docs-v2
Error: Failed to parse URL from /api/v1/skills/clawd-docs-v2

Cause

In skills.ts:156, the apiRequest call was using url: with a relative path:

{ method: 'GET', url: `${ApiRoutes.skills}/${encodeURIComponent(entry)}` }

The apiRequest function in http.ts handles url and path differently:

const url = 'url' in args ? args.url : new URL(args.path, registry).toString();

When url is provided, it's used as-is without combining with the registry base URL, causing URL parsing to fail on a relative path.

Fix

Changed url: to path: so the relative path is properly combined with the registry base URL.

Test plan

  • Tested locally with clawdhub update --all - now works correctly

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/clawhub/pull/22 **Author:** [@daveonkels](https://github.com/daveonkels) **Created:** 1/19/2026 **Status:** ✅ Merged **Merged:** 1/24/2026 **Merged by:** [@steipete](https://github.com/steipete) **Base:** `main` ← **Head:** `fix/update-url-parsing` --- ### 📝 Commits (1) - [`cbcba0c`](https://github.com/openclaw/clawhub/commit/cbcba0cdf7306e4ce5e04062eaa4585f6d5f968c) fix: use path instead of url for skill metadata API call ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/clawdhub/src/cli/commands/skills.ts` (+1 -1) </details> ### 📄 Description ## Summary - Fixed URL parsing error in `cmdUpdate` when updating skills without local fingerprint match ## Problem Running `clawdhub update --all` fails with: ``` ✖ Failed to parse URL from /api/v1/skills/clawd-docs-v2 Error: Failed to parse URL from /api/v1/skills/clawd-docs-v2 ``` ## Cause In `skills.ts:156`, the `apiRequest` call was using `url:` with a relative path: ```typescript { method: 'GET', url: `${ApiRoutes.skills}/${encodeURIComponent(entry)}` } ``` The `apiRequest` function in `http.ts` handles `url` and `path` differently: ```typescript const url = 'url' in args ? args.url : new URL(args.path, registry).toString(); ``` When `url` is provided, it's used as-is without combining with the registry base URL, causing URL parsing to fail on a relative path. ## Fix Changed `url:` to `path:` so the relative path is properly combined with the registry base URL. ## Test plan - [x] Tested locally with `clawdhub update --all` - now works correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:16:19 -05:00
yindo closed this issue 2026-02-15 17:16:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#216