microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.82k stars 593 forks source link

[rush] Support an array of repository URLs in rush.json. #1555

Closed iclanton closed 1 year ago

iclanton commented 4 years ago

Is this a feature or a bug?

Please describe the actual behavior.

We recently renamed this repo, which means that the git clone URL changed from https://github.com/microsoft/web-build-tools.git to https://github.com/microsoft/rushstack.git. I just ran rush change in this repo and it wasn't able to determine which branch to diff against because my clone sill pointed at https://github.com/microsoft/web-build-tools.git.

This is also an issue with Azure DevOps repositories, which can be configured to be accessed at either https://dev.azure.com/<project> or https://<project>.visualstudio.com/.

What is the expected behavior?

Clones prior to renames should be supported.

I propose we change the schema of rush.json to support either a string or a string[] for the repository.url property, where a list of URLs may be provided, any one of which is a valid URL for a default remote.

If this is a bug, please provide the tool version, Node.js version, and OS.

wbern commented 4 years ago

Actually this is a good suggestion, we are also going through issues where some users are using an old path in their local git repository to this day, and get warnings because of it.

octogonz commented 4 years ago

Maybe we can also include the two suggestions from https://github.com/microsoft/rushstack/issues/1522#issuecomment-531391023, perhaps using the normalize-git-url package mentioned in that thread.

iclanton commented 4 years ago

What was @deanbot's problem? Was it https://my-tenant.visualstudio.com/my-project/_git/my-repo vs my-tenant@vs-ssh.visualstudio.com:v3/my-tenant/my-project/my-repo?

I think with this feature, he'd want to just specify both of those URLs. I'm uncomfortable with Rush trying to translate between the two. Introducing Azure DevOps (or any source control provider) -specific URL transformations in Rush feels inappropriate.

deanbot commented 4 years ago

@iclanton it was just ssh vs https repo address. Great idea re including multiple urls.

b-my commented 4 years ago

I would also like this feature. We use an ssh key to checkout files locally but the ci system uses https.

EvanCahill commented 2 years ago

@iclanton should this have been closed with #3083?

elliot-nelson commented 1 year ago

✅ Fixed in the above-mentioned PR (rush.json now supports "url" and "urls" properties).