swellaby / vsts-mirror-git-repository

A straightforward utility to mirror one Git repository to another location
MIT License
25 stars 15 forks source link

Removing also merge-request before pushing #125

Closed dvanicek-idc closed 1 year ago

dvanicek-idc commented 1 year ago

Description

Hi, I am mirroring repository from Azure DevOps git into GitLab and It always ends with an error ! [remote rejected] refs/merge-requests/10/head -> refs/merge-requests/10/head (deny updating a hidden ref)

Would it be possible to also remove "refs/merge-requests" from packed-refs, similar to removing "refs/pull"?

Thank you!

calebcartwright commented 1 year ago

Sure, sounds reasonable. I'm too stretched at the moment to work on this myself, but should be a fairly easy enhancement if you or someone else would be up for working on it:

https://github.com/swellaby/vsts-mirror-git-repository/blob/8c23abd4d906ac5b9f15cb43c6e731150fb155b4/src/git-mirror/git-mirror-task.ts#L81

dvanicek-idc commented 1 year ago

Hi Caleb, seems that releasing a new version failed. https://dev.azure.com/swellaby/OpenSource/_build/results?buildId=19669&view=logs&j=fd490c07-0b22-5182-fac9-6d67fe1e939b&t=a30880d3-1692-5162-80b1-d77aaa3c15f6

calebcartwright commented 1 year ago

Yup, a lot of these older extensions have pipelines configured with older (and often expired) auth tokens, but the new version should be out on the marketplace now.

Going to close, but please test the new version and ensure it is function as expected

dvanicek-idc commented 1 year ago

Works great. Thanks!