dekorateio / dekorate

Tools for generating Kubernetes related manifests.
Apache License 2.0
471 stars 101 forks source link

fix: resolution of git remotes #1214

Closed Sgitario closed 1 year ago

Sgitario commented 1 year ago

Once the first git remote is found, we iterate over all the values and overwrite the values.

For example, having:

[remote "origin"]
    url = git@github.com:Sgitario/dekorate.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[remote "upstream"]
    url = git@github.com:dekorateio/dekorate.git
    fetch = +refs/heads/*:refs/remotes/upstream/*
[remote "auri"]
    url = https://github.com/aureamunoz/dekorate
    fetch = +refs/heads/*:refs/remotes/auri/*

Will produce a map of only an entry with:

'remote "origin"': https://github.com/aureamunoz/dekorate

Because https://github.com/aureamunoz/dekorate, it's the last value.

Also, the logic about remotes need to be aligned with this in the TektonManifestGenerator.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information