diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-11 00:05:13 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-11 00:05:13 +0000 |
commit | 4c06810ef15a522f7131bbc230e5105a2e8a9f8e (patch) | |
tree | 37c7e6a1b022e85919e65ada4f2ae3f5ce0f9f7d /src | |
parent | 251a5821bb590e7f71d68615b6d7cc4ebf124ca1 (diff) |
Add repository name to merge message
Diffstat (limited to 'src')
-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; |