diff --git a/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java b/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java
index e9e126f6f..b3d3c6b2e 100644
--- a/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java
+++ b/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java
@@ -54,8 +54,6 @@ import java.util.Objects;
@Feature(cls = ClassFeature.BUILD)
public class BuildInfoController extends BaseServerController {
- @Resource
- private BuildService buildService;
@Resource
private DbBuildHistoryLogService dbBuildHistoryLogService;
@Resource
@@ -155,12 +153,17 @@ public class BuildInfoController extends BaseServerController {
buildInfoModel = new BuildInfoModel();
buildInfoModel.setId(IdUtil.fastSimpleUUID());
}
- buildInfoModel.setGroup(group);
- buildInfoModel.setName(name);
+ // 判断 group 是否为空
+ if (StrUtil.isNotEmpty(group)) {
+ buildInfoModel.setGroup(group);
+ }
// 如果是 SVN
if (BuildModel.RepoType.Svn.getCode() == repositoryModel.getRepoType()) {
branchName = "trunk";
}
+ // 设置参数
+ buildInfoModel.setRepositoryId(repositoryId);
+ buildInfoModel.setName(name);
buildInfoModel.setBranchName(branchName);
buildInfoModel.setResultDirFile(resultDirFile);
buildInfoModel.setScript(script);
diff --git a/web-vue/src/pages/build/list-info.vue b/web-vue/src/pages/build/list-info.vue
index a76c5fd09..ad539fab4 100644
--- a/web-vue/src/pages/build/list-info.vue
+++ b/web-vue/src/pages/build/list-info.vue
@@ -9,7 +9,7 @@
搜索
新增
- 刷新
+ 刷新
-
+
{{ item.name }}[{{ item.gitUrl }}]
@@ -419,6 +419,14 @@ export default {
this.loadData();
this.loadRepositoryList();
},
+ // 选择仓库
+ changeRepositpry(value) {
+ this.repositoryList.forEach(element => {
+ if (element.id === value) {
+ this.tempRepository = element;
+ }
+ })
+ },
// 添加
handleAdd() {
this.temp = {