diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-10 23:41:52 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-10 23:41:52 +0000 |
commit | 523c3ec09b609d030a432dbdb5d02f1f7e120b74 (patch) | |
tree | 4532f8bf89a1e1195c6afc9490f0bd2fc56f162a | |
parent | 73f847f9ef7dd7ae06b39a4a75540fed39392d5c (diff) | |
parent | 397f3f4526898af57abaec3ec5bd6f2cac1fa3fa (diff) |
Merge branches
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; } } |