diff options
3 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java b/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java index e8d521a..8752401 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java @@ -38,6 +38,7 @@ public class GitMergeController { String url = mergeMsg.getUrl(); //DANGER Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + user + action + source + " to " + target + ": " + url + " | bash /home/smsd/msgrelay.bash "}); + model.addAttribute("result", "OK"); } catch (IOException e) { System.out.println("Failed to run command"); diff --git a/src/main/java/uk/co/blatech/blaears/models/gitlab/ObjectAttributes.java b/src/main/java/uk/co/blatech/blaears/models/gitlab/ObjectAttributes.java index 8c679d7..63bc758 100644 --- a/src/main/java/uk/co/blatech/blaears/models/gitlab/ObjectAttributes.java +++ b/src/main/java/uk/co/blatech/blaears/models/gitlab/ObjectAttributes.java @@ -1,5 +1,7 @@ package uk.co.blatech.blaears.models.gitlab; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * Model for a GitLab object_attribute which is used in various hook messages, to be converted from JSON * See http://www.blatech.co.uk/help/web_hooks/web_hooks @@ -7,7 +9,11 @@ package uk.co.blatech.blaears.models.gitlab; public class ObjectAttributes { int id; + + @JsonProperty("target_branch") String targetBranch; + + @JsonProperty("source_branch") String sourceBranch; String title; diff --git a/src/main/java/uk/co/blatech/blaears/models/gitlab/User.java b/src/main/java/uk/co/blatech/blaears/models/gitlab/User.java index 8403d83..4196e76 100644 --- a/src/main/java/uk/co/blatech/blaears/models/gitlab/User.java +++ b/src/main/java/uk/co/blatech/blaears/models/gitlab/User.java @@ -8,8 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; */ public class User { String name; - @JsonProperty("user_name") - String userName; + String username; public String getName() { return name; @@ -19,11 +18,11 @@ public class User { this.name = name; } - public String getUserName() { - return userName; + public String getUsername() { + return username; } - public void setUserName(String userName) { - this.userName = userName; + public void setUserNnme(String username) { + this.username = username; } } |