Skip to content

Commit e380eae

Browse files
CR-5892
1 parent 97f12d9 commit e380eae

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.26.2
1+
0.26.3

pkg/codefresh/gitops.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
type (
99
GitopsAPI interface {
10-
CreateEnvironment(name string, project string, application string, integration string) error
10+
CreateEnvironment(name string, project string, application string, integration string, namespace string) error
1111
SendEnvironment(environment Environment) (map[string]interface{}, error)
1212
DeleteEnvironment(name string) error
1313
GetEnvironments() ([]CFEnvironment, error)
@@ -47,6 +47,7 @@ type (
4747
Context string `json:"context"`
4848
Project string `json:"project"`
4949
Application string `json:"application"`
50+
Namespace string `json:"namespace,omitempty"`
5051
}
5152

5253
EnvironmentPayload struct {
@@ -132,7 +133,7 @@ func newGitopsAPI(codefresh *codefresh) GitopsAPI {
132133
return &gitops{codefresh}
133134
}
134135

135-
func (a *gitops) CreateEnvironment(name string, project string, application string, integration string) error {
136+
func (a *gitops) CreateEnvironment(name string, project string, application string, integration string, namespace string) error {
136137
_, err := a.codefresh.requestAPI(&requestOptions{
137138
method: "POST",
138139
path: "/api/gitops/application",
@@ -146,6 +147,7 @@ func (a *gitops) CreateEnvironment(name string, project string, application stri
146147
Context: integration,
147148
Project: project,
148149
Application: application,
150+
Namespace: namespace,
149151
},
150152
},
151153
})

0 commit comments

Comments
 (0)