Skip to content

Commit 06f592c

Browse files
committed
fix secret naming
1 parent 41d70c6 commit 06f592c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

core/src/main/java/com/flowci/core/flow/controller/FlowController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public Flow confirm(@PathVariable String name, @RequestBody(required = false) Gi
8181
if (Objects.isNull(gitSettings)) {
8282
gitSettings = new GitSettings();
8383
}
84-
return flowService.confirm(name, gitSettings.getGitUrl(), gitSettings.getCredential());
84+
return flowService.confirm(name, gitSettings.getGitUrl(), gitSettings.getSecret());
8585
}
8686

8787
@PostMapping(value = "/{name}/sourceOfYaml")

core/src/main/java/com/flowci/core/flow/domain/GitSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ public class GitSettings {
2626

2727
private String gitUrl;
2828

29-
private String credential;
30-
29+
private String secret;
3130
}

core/src/main/java/com/flowci/core/flow/service/FlowServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public Flow create(String name) {
171171
}
172172

173173
@Override
174-
public Flow confirm(String name, String gitUrl, String credential) {
174+
public Flow confirm(String name, String gitUrl, String secret) {
175175
Flow flow = get(name);
176176

177177
if (flow.getStatus() == Status.CONFIRMED) {
@@ -184,8 +184,8 @@ public Flow confirm(String name, String gitUrl, String credential) {
184184
localVars.put(Variables.Flow.GitUrl, VarValue.of(gitUrl, VarType.GIT_URL, true));
185185
}
186186

187-
if (StringHelper.hasValue(credential)) {
188-
localVars.put(Variables.Flow.GitCredential, VarValue.of(credential, VarType.STRING, true));
187+
if (StringHelper.hasValue(secret)) {
188+
localVars.put(Variables.Flow.GitCredential, VarValue.of(secret, VarType.STRING, true));
189189
}
190190

191191
flow.setStatus(Status.CONFIRMED);

0 commit comments

Comments
 (0)