Skip to content

Commit 0c8dfe7

Browse files
added default git integration (#337)
* bump * update models
1 parent f98e605 commit 0c8dfe7

File tree

5 files changed

+1097
-43
lines changed

5 files changed

+1097
-43
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.36.1
1+
0.37.0

pkg/codefresh/ap_git_integrations.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import (
1010
type (
1111
IAppProxyGitIntegrationsAPI interface {
1212
List(ctx context.Context) ([]model.GitIntegration, error)
13-
Get(ctx context.Context, name string) (*model.GitIntegration, error)
13+
Get(ctx context.Context, name *string) (*model.GitIntegration, error)
1414
Add(ctx context.Context, args *model.AddGitIntegrationArgs) (*model.GitIntegration, error)
1515
Edit(ctx context.Context, args *model.EditGitIntegrationArgs) (*model.GitIntegration, error)
1616
Remove(ctx context.Context, name string) error
1717
Register(ctx context.Context, args *model.RegisterToGitIntegrationArgs) (*model.GitIntegration, error)
18-
Deregister(ctx context.Context, name string) (*model.GitIntegration, error)
18+
Deregister(ctx context.Context, name *string) (*model.GitIntegration, error)
1919
}
2020

2121
gitIntegrations struct {
@@ -100,10 +100,10 @@ func (c *gitIntegrations) List(ctx context.Context) ([]model.GitIntegration, err
100100
return res.Data.GitIntegrations, nil
101101
}
102102

103-
func (c *gitIntegrations) Get(ctx context.Context, name string) (*model.GitIntegration, error) {
103+
func (c *gitIntegrations) Get(ctx context.Context, name *string) (*model.GitIntegration, error) {
104104
jsonData := map[string]interface{}{
105105
"query": `
106-
query GetGitIntegration($name: String!) {
106+
query GetGitIntegration($name: String) {
107107
gitIntegration(name: $name) {
108108
name
109109
sharingPolicy
@@ -254,10 +254,10 @@ func (c *gitIntegrations) Register(ctx context.Context, args *model.RegisterToGi
254254
return res.Data.RegisterToGitIntegration, nil
255255
}
256256

257-
func (c *gitIntegrations) Deregister(ctx context.Context, name string) (*model.GitIntegration, error) {
257+
func (c *gitIntegrations) Deregister(ctx context.Context, name *string) (*model.GitIntegration, error) {
258258
jsonData := map[string]interface{}{
259259
"query": `
260-
mutation DeregisterToGitIntegration($name: String!) {
260+
mutation DeregisterToGitIntegration($name: String) {
261261
deregisterFromGitIntegration(name: $name) {
262262
name
263263
sharingPolicy

pkg/codefresh/codefresh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (c *codefresh) AppProxy(ctx context.Context, runtime string) (AppProxyAPI,
127127
return nil, fmt.Errorf("failed to create app-proxy client for runtime %s: %w", runtime, err)
128128
}
129129

130-
if rt.IngressHost == nil {
130+
if rt.IngressHost == nil || *rt.IngressHost == "" {
131131
return nil, fmt.Errorf("failed to create app-proxy client for runtime %s: runtime does not have ingressHost configured", runtime)
132132
}
133133

0 commit comments

Comments
 (0)