Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolution of git remotes #1214

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Conversation

Sgitario
Copy link
Collaborator

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.

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
Copy link

sonarcloud bot commented Jun 14, 2023

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

Copy link
Member

@iocanel iocanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@iocanel iocanel merged commit b458ad8 into dekorateio:main Jun 15, 2023
@Sgitario Sgitario deleted the 1007_git_remotes branch June 15, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants