Add the ability to set a mirror URL to the project API endpoint

There is no way to set a mirror URL for a project

Right now we have 5 different mirroring settings for a project in the API, but none of them seem to allow setting the remote URL to mirror.

Target audience

  • Devon, DevOps Engineer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#devon-devops-engineer

Further details

Right now it looks like the only way to set a remote URL to mirror is via the web UI. For anyone looking to mirror a lot of repositories, going through that process hundreds of times would be incredibly painful.

We can currently set:

mirror - on/off mirror_user_id int mirror_trigger_builds on/off only_mirror_protected_branches on/off mirror_overwrites_diverged_branches on/off

But there appears to be now way to set a remote "Git repository URL" like we can in the web UI.

Proposal

Add an attribute to the projects API to allow for setting the remote URL.

Permissions and Security

The security is already covered by the projects API

Assignee Loading
Time tracking Loading