Skip to content

The Unified and Autonomous Development Platform

Fix post-receive hook issue.

robin shine45cccd2406e5
diff --git a/gitop.core/src/main/java/com/pmease/gitop/core/hookcallback/PreReceiveServlet.java b/gitop.core/src/main/java/com/pmease/gitop/core/hookcallback/PreReceiveServlet.java
index 8bc0fcd114..49620649c8 100644
--- a/gitop.core/src/main/java/com/pmease/gitop/core/hookcallback/PreReceiveServlet.java
+++ b/gitop.core/src/main/java/com/pmease/gitop/core/hookcallback/PreReceiveServlet.java
@@ -12,7 +12,6 @@ public class PreReceiveServlet extends CallbackServlet {
protected void callback(String callbackData, Output output) {
output.writeLine("hello world");
output.writeLine("just do it");
- output.markError();
}
}
diff --git a/gitop.core/src/main/java/com/pmease/gitop/core/manager/impl/DefaultProjectManager.java b/gitop.core/src/main/java/com/pmease/gitop/core/manager/impl/DefaultProjectManager.java
index 0a97b680f2..309c883dc5 100644
--- a/gitop.core/src/main/java/com/pmease/gitop/core/manager/impl/DefaultProjectManager.java
+++ b/gitop.core/src/main/java/com/pmease/gitop/core/manager/impl/DefaultProjectManager.java
@@ -92,7 +92,7 @@ public class DefaultProjectManager extends AbstractGenericDao<Project> implement
File postReceiveHook = new File(hooksDir, "post-receive");
FileUtils.writeFile(postReceiveHook,
- String.format(hookTemplate, urlRoot, PostReceiveServlet.PATH));
+ String.format(hookTemplate, urlRoot + PostReceiveServlet.PATH));
postReceiveHook.setExecutable(true);
} else {
File codeDir = storageManager.getStorage(entity).ofCode();