botrun-mcli
Advanced tools
+1
-1
| { | ||
| "name": "botrun-mcli", | ||
| "version": "0.1.0", | ||
| "version": "0.2.0", | ||
| "description": "Git-backed memory CLI for AI agents", | ||
@@ -5,0 +5,0 @@ "type": "module", |
| export function buildCloneUrl(repo, token) { | ||
| return `https://x-access-token:${token}@${repo}.git`; | ||
| // Normalize: strip https://, trailing .git | ||
| const cleaned = repo | ||
| .replace(/^https?:\/\//, '') | ||
| .replace(/\.git$/, ''); | ||
| return `https://x-access-token:${token}@${cleaned}.git`; | ||
| } |
@@ -7,4 +7,4 @@ import * as github from './github.mjs'; | ||
| export function detectProvider(repoUrl) { | ||
| if (repoUrl.startsWith('github.com')) return 'github'; | ||
| if (repoUrl.startsWith('gitlab.com')) return 'gitlab'; | ||
| if (repoUrl.includes('github.com')) return 'github'; | ||
| if (repoUrl.includes('gitlab.com')) return 'gitlab'; | ||
| throw new Error(`Unknown git provider for URL: ${repoUrl}`); | ||
@@ -11,0 +11,0 @@ } |
16609
0.78%267
1.52%