Skip to content

fix: Generate unique remote name when publishing

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.

Description

When publishing a project to GitLab that has an existing remote, it will attempt to create a remote named 'origin'. If this already exists, it will show an error and not push the folder to GitLab.

This MR will choose a unique name 'origin', 'origin2', 'origin3', etc.

How has this been tested?

  1. Open a repository that has a remote named 'origin'.
  2. Open the command palette and choose "Publish Workspace to GitLab".
  3. Complete the form.
  4. It should have added a new remote named 'origin2' or similar, instead of showing an error.

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading