feat: abstract GitLab/GitHub CLI usage (#10)
- Move resolveRepoPath to lib/utils.ts - Update all tools to use createProvider() from lib/providers/ - Remove direct imports from lib/gitlab.ts - Mark lib/gitlab.ts as deprecated - All tools now work with both GitHub (gh CLI) and GitLab (glab CLI) - Provider auto-detected from git remote URL
This commit is contained in:
13
lib/utils.ts
Normal file
13
lib/utils.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Shared utilities for DevClaw.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Resolve the repo path from projects.json repo field (handles ~/).
|
||||
*/
|
||||
export function resolveRepoPath(repoField: string): string {
|
||||
if (repoField.startsWith("~/")) {
|
||||
return repoField.replace("~", process.env.HOME ?? "/home/lauren");
|
||||
}
|
||||
return repoField;
|
||||
}
|
||||
Reference in New Issue
Block a user