Skip to content

The Unified and Autonomous Development Platform

Some wording changes for gate keepers.

robin shine7f8d24882f4d
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PerformSpecifiedOperations.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PerformSpecifiedOperations.java
index a83f60e8b8..7d675c6b67 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PerformSpecifiedOperations.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PerformSpecifiedOperations.java
@@ -58,14 +58,14 @@ public class PerformSpecifiedOperations extends AbstractGateKeeper implements Va
private GateCheckResult checkUpdate() {
if (updateRef) {
- return passed(Lists.newArrayList("Ref is being updated"));
+ return passed(Lists.newArrayList("Trying to update a ref"));
}
List<String> reasons = new ArrayList<>();
if (deleteRef) {
- reasons.add("Ref is not being deleted");
+ reasons.add("Trying to delete a ref");
}
if (createRef) {
- reasons.add("Ref is not being created");
+ reasons.add("Trying to create a ref");
}
return failed(reasons);
}
@@ -84,26 +84,26 @@ public class PerformSpecifiedOperations extends AbstractGateKeeper implements Va
protected GateCheckResult doCheckPush(Account user, Depot depot, String refName, ObjectId oldCommit, ObjectId newCommit) {
if (oldCommit.equals(ObjectId.zeroId())) {
if (createRef) {
- return passed(Lists.newArrayList("Ref is being created"));
+ return passed(Lists.newArrayList("Trying to create a ref"));
}
List<String> reasons = new ArrayList<>();
if (updateRef) {
- reasons.add("Ref is not being updated");
+ reasons.add("Trying to update a ref");
}
if (deleteRef) {
- reasons.add("Ref is not being deleted");
+ reasons.add("Trying to delete a ref");
}
return failed(reasons);
} else if (newCommit.equals(ObjectId.zeroId())) {
if (deleteRef) {
- return passed(Lists.newArrayList("Ref is being deleted"));
+ return passed(Lists.newArrayList("Trying to delete a ref"));
}
List<String> reasons = new ArrayList<>();
if (createRef) {
- reasons.add("Ref is not being created");
+ reasons.add("Trying to create a ref");
}
if (updateRef) {
- reasons.add("Ref is not being updated");
+ reasons.add("Trying to update a ref");
}
return failed(reasons);
} else {
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PushWithoutRewritingHistory.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PushWithoutRewritingHistory.java
index 2d62d78ad6..170f272193 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PushWithoutRewritingHistory.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/PushWithoutRewritingHistory.java
@@ -32,9 +32,9 @@ public class PushWithoutRewritingHistory extends AbstractGateKeeper {
protected GateCheckResult doCheckPush(Account user, Depot depot, String refName, ObjectId oldCommit, ObjectId newCommit) {
if (!oldCommit.equals(ObjectId.zeroId()) && !newCommit.equals(ObjectId.zeroId())) {
if (GitUtils.isMergedInto(depot.getRepository(), oldCommit, newCommit))
- return passed(Lists.newArrayList("Push operation does not rewrite history"));
+ return passed(Lists.newArrayList("Not trying to rewrite history"));
else
- return failed(Lists.newArrayList("Push operation rewrites history"));
+ return failed(Lists.newArrayList("Trying to rewrite history"));
} else {
return ignored();
}