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

Adding gitops support for all git repositories #4743

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions chaoscenter/graphql/server/pkg/gitops/gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/go-git/go-git/v5/plumbing/transport/ssh"
Expand Down Expand Up @@ -172,6 +173,13 @@ func (c GitConfig) GitClone() (*git.Repository, error) {
// getAuthMethod returns the AuthMethod instance required for the current repo access [read/writes]
func (c GitConfig) getAuthMethod() (transport.AuthMethod, error) {

// Azure DevOps requires the 'multi_ack' and 'multi_ack_detailed' capabilities,
// which are not fully implemented in the go-git package. By default, these
// capabilities are included in 'transport.UnsupportedCapabilities'.
transport.UnsupportedCapabilities = []capability.Capability{
JanhaviAlekar marked this conversation as resolved.
Show resolved Hide resolved
capability.ThinPack,
}

switch c.AuthType {

case model.AuthTypeToken:
Expand Down
2 changes: 1 addition & 1 deletion chaoscenter/web/src/strings/strings.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ genericResourceNotFoundError: >-
has been deleted.
gitConnection: Repository Connection
gitOps: GitOps
githubRepo: Github Repository
gitops: Gitops
goBack: Go back to previous page
goChaosHome: Go to Home
Expand Down Expand Up @@ -889,6 +888,7 @@ referencedBy: Referenced By
registry: Registry
registryName: Registry Name
registryType: Registry Type
remoteRepo: Remote Repository
remove: Remove
removeMember: Remove Member
removeMemberConfirmation: Are you sure you want to remove {{username}}?
Expand Down
2 changes: 1 addition & 1 deletion chaoscenter/web/src/strings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ export interface StringsMap {
'genericResourceNotFoundError': PrimitiveObject<'resource' | 'resourceID' | 'projectID'>
'gitConnection': unknown
'gitOps': unknown
'githubRepo': unknown
'gitops': unknown
'goBack': unknown
'goChaosHome': unknown
Expand Down Expand Up @@ -737,6 +736,7 @@ export interface StringsMap {
'registry': unknown
'registryName': unknown
'registryType': unknown
'remoteRepo': unknown
'remove': unknown
'removeMember': unknown
'removeMemberConfirmation': PrimitiveObject<'username'>
Expand Down
2 changes: 1 addition & 1 deletion chaoscenter/web/src/views/Gitops/Gitops.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default function GitopsView({
font={{ variation: FontVariation.BODY2_SEMI, weight: 'semi-bold' }}
color={Color.BLACK}
>
{getString('githubRepo')}
{getString('remoteRepo')}
</Text>
</Layout.Vertical>
{gitopsType === GitopsValues.GITHUB && (
Expand Down
Loading