@andre.buzeli/git-mcp 16.0.5 → 16.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andre.buzeli/git-mcp",
3
- "version": "16.0.5",
3
+ "version": "16.0.6",
4
4
  "private": false,
5
5
  "description": "MCP server para Git com operações locais e sincronização paralela GitHub/Gitea",
6
6
  "license": "MIT",
@@ -318,6 +318,19 @@ EXEMPLOS DE USO:
318
318
 
319
319
  const organization = args.organization || undefined;
320
320
 
321
+ // Ensure repos exist and set correct remote URLs (handles GitHub org fallback)
322
+ if (organization) {
323
+ const repo = getRepoNameFromPath(projectPath);
324
+ const isPublic = args.isPublic === true;
325
+ const ensured = await pm.ensureRepos({ repoName: repo, createIfMissing: true, isPublic, organization });
326
+ const githubUrl = ensured.github?.ok && ensured.github.repo
327
+ ? `https://github.com/${ensured.github.repo}.git` : "";
328
+ const giteaBase = pm.giteaUrl?.replace(/\/$/, "");
329
+ const giteaUrl = ensured.gitea?.ok && ensured.gitea.repo && giteaBase
330
+ ? `${giteaBase}/${ensured.gitea.repo}.git` : "";
331
+ await git.ensureRemotes(projectPath, { githubUrl, giteaUrl, organization });
332
+ }
333
+
321
334
  // Retry logic for push (often fails due to network or concurrent updates)
322
335
  const result = await withRetry(
323
336
  () => git.pushParallel(projectPath, branch, force, organization),