From bc26bcabd4d27b6465162b2c4b3fd96fdd9a78c1 Mon Sep 17 00:00:00 2001 From: shizhendong Date: Mon, 4 Nov 2024 17:36:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=B8=B4=E6=97=B6=E5=A4=84=E7=90=86?= =?UTF-8?q?=20asw=20=E5=92=8C=20opensearch=20=E7=BB=84=E4=BB=B6=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=AF=B9=E5=BA=94=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../geedge/asw/module/app/service/impl/GitServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java b/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java index 33a55c5..64b4c9d 100644 --- a/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java +++ b/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java @@ -416,11 +416,12 @@ public class GitServiceImpl implements IGitService { files.add( T.MapUtil.builder() .put("path", path) - .put("addedLines", (addedLines == 0 ? 0 : ++addedLines)) - .put("removedLines", (deletedLines == 0 ? 0 : ++deletedLines)) + .put("addedLines", addedLines) + .put("removedLines", deletedLines) .put("encoding", encoding) .put("oldContent", oldContent) .put("newContent", newContent) + .put("action", diff.getChangeType().name().toLowerCase()) .build() ); } From e210cb7cd0e0ac5085a7de23966fa3f2896d8b9b Mon Sep 17 00:00:00 2001 From: shizhendong Date: Mon, 4 Nov 2024 17:39:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E5=85=81=E8=AE=B8=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=A9=BA=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../geedge/asw/module/app/controller/GitController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/geedge/asw/module/app/controller/GitController.java b/src/main/java/net/geedge/asw/module/app/controller/GitController.java index 55e6be5..f331174 100644 --- a/src/main/java/net/geedge/asw/module/app/controller/GitController.java +++ b/src/main/java/net/geedge/asw/module/app/controller/GitController.java @@ -152,10 +152,10 @@ public class GitController { if (T.StrUtil.hasEmpty(action, path)) { return R.error(RCode.PARAM_CANNOT_EMPTY); } - if (T.StrUtil.equalsAny(action, "create", "update")) { - String content = T.MapUtil.getStr(file, "content"); - T.VerifyUtil.is(content).notEmpty(RCode.PARAM_CANNOT_EMPTY); - } +// if (T.StrUtil.equalsAny(action, "create", "update")) { +// String content = T.MapUtil.getStr(file, "content"); +// T.VerifyUtil.is(content).notEmpty(RCode.PARAM_CANNOT_EMPTY); +// } } gitService.updateApplication(workspaceId, branchName, lastCommitId, message, files); return R.ok(); From 25992507a6cc476d74839fc58dd2e0afc6cd7e34 Mon Sep 17 00:00:00 2001 From: shizhendong Date: Mon, 4 Nov 2024 18:04:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E6=8C=89=E6=96=87=E6=A1=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4=20git=20update=20=E6=8E=A5=E5=8F=A3=EF=BC=8Ccreate?= =?UTF-8?q?=EF=BC=8Cupdate=20=E5=8A=A8=E4=BD=9C=E5=BF=85=E9=A1=BB=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../geedge/asw/module/app/controller/GitController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/geedge/asw/module/app/controller/GitController.java b/src/main/java/net/geedge/asw/module/app/controller/GitController.java index f331174..55e6be5 100644 --- a/src/main/java/net/geedge/asw/module/app/controller/GitController.java +++ b/src/main/java/net/geedge/asw/module/app/controller/GitController.java @@ -152,10 +152,10 @@ public class GitController { if (T.StrUtil.hasEmpty(action, path)) { return R.error(RCode.PARAM_CANNOT_EMPTY); } -// if (T.StrUtil.equalsAny(action, "create", "update")) { -// String content = T.MapUtil.getStr(file, "content"); -// T.VerifyUtil.is(content).notEmpty(RCode.PARAM_CANNOT_EMPTY); -// } + if (T.StrUtil.equalsAny(action, "create", "update")) { + String content = T.MapUtil.getStr(file, "content"); + T.VerifyUtil.is(content).notEmpty(RCode.PARAM_CANNOT_EMPTY); + } } gitService.updateApplication(workspaceId, branchName, lastCommitId, message, files); return R.ok();