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

use git providers #205

Merged
merged 3 commits into from
May 13, 2024
Merged

use git providers #205

merged 3 commits into from
May 13, 2024

Conversation

nabuskey
Copy link
Collaborator

@nabuskey nabuskey commented Apr 22, 2024

With this PR, I am trying to lay ground work for enabling integrations with GitHub.

This doesn't change our current behaviours at all. It still uses Gitea as the git provider.

@nimakaviani
Copy link
Contributor

Amazing, thanks! will review later today but very excited about this.

cc @greghaynes

@nabuskey nabuskey marked this pull request as draft April 22, 2024 21:45
@nabuskey nabuskey marked this pull request as ready for review April 23, 2024 16:24
Name: v1alpha1.GitProviderGitea,
GitURL: resource.Spec.GitServerURL,
InternalGitURL: resource.Spec.InternalGitServeURL,
OrganizationName: v1alpha1.GiteaAdminUserName,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bit confusing here that we have an variable GiteaAdminUserName as the OrganizationName we probably can have a better variable name or make some clarification here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is how it's set up right now and this will be changed in the future. The primary purpose of this PR is to keep the current default behaviour but allow for modifications in the future.

pkg/controllers/gitrepository/gitea.go Show resolved Hide resolved
pkg/controllers/localbuild/controller.go Outdated Show resolved Hide resolved
Copy link
Contributor

@nimakaviani nimakaviani left a comment

Choose a reason for hiding this comment

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

Thank you for this. left a few comments.

Would love to have the README updated as part of this PR. makes the usage flow clearer both for the users and the reviewers.

pkg/controllers/gitrepository/git_repository.go Outdated Show resolved Hide resolved
pkg/controllers/localbuild/controller.go Outdated Show resolved Hide resolved
GitURL: resource.Status.Gitea.ExternalURL,
InternalGitURL: resource.Status.Gitea.InternalURL,
Provider: v1alpha1.Provider{
Name: v1alpha1.GitProviderGitea,
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that we are hard-coding it to Gitea, what would be the step for users to choose GitHub instead? Are the users expecetd to add a separate provider to support Github in a way that it co-exists with Gitea? or is there a way to choose alternatives?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No way to choose an alternative with this PR. To do it, we need to update the CLI and other controllers. Doing it in all one PR will result in a massive PR. Trying to keep a PR small.

pkg/controllers/gitrepository/gitea.go Show resolved Hide resolved
nabuskey added 3 commits May 2, 2024 18:51
Signed-off-by: Manabu McCloskey <[email protected]>
Signed-off-by: Manabu McCloskey <[email protected]>
Signed-off-by: Manabu McCloskey <[email protected]>
Copy link
Contributor

@nimakaviani nimakaviani left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this!

@nimakaviani nimakaviani merged commit c96f4ef into cnoe-io:main May 13, 2024
2 checks passed
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.

3 participants