diff options
-rw-r--r-- | src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java | 5 | ||||
-rw-r--r-- | src/main/java/uk/co/blatech/blaears/models/gitlab/Merge.java | 9 |
2 files changed, 12 insertions, 2 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 b33b075..d5cabaf 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java @@ -36,9 +36,10 @@ public class GitMergeController { String source = mergeMsg.getObjectAttributes().getSourceBranch(); String target = mergeMsg.getObjectAttributes().getTargetBranch(); String url = mergeMsg.getObjectAttributes().getUrl(); - String title = mergeMsg.getObjectAttributes().getUrl(); + String title = mergeMsg.getObjectAttributes().getTitle(); + String repo = mergeMsg.getRepository().getName(); //DANGER - Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + user + action + source + " to " + target + ": [" + title + "] "+ url + " | bash /home/smsd/msgrelay.bash "}); + Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + user + action + source + " to " + target + " on " + repo + ": [" + title + "] "+ url + " | bash /home/smsd/msgrelay.bash "}); model.addAttribute("result", "OK"); } catch (IOException e) { diff --git a/src/main/java/uk/co/blatech/blaears/models/gitlab/Merge.java b/src/main/java/uk/co/blatech/blaears/models/gitlab/Merge.java index ced162c..2e1f0d9 100644 --- a/src/main/java/uk/co/blatech/blaears/models/gitlab/Merge.java +++ b/src/main/java/uk/co/blatech/blaears/models/gitlab/Merge.java @@ -13,6 +13,15 @@ public class Merge { User user; @JsonProperty("object_attributes") ObjectAttributes objectAttributes; + Repository repository; + + public Repository getRepository() { + return repository; + } + + public void setRepository(Repository repository) { + this.repository = repository; + } public String getObjectKind() { return objectKind; |