diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-10 23:41:12 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-10 23:41:12 +0000 |
commit | 73f847f9ef7dd7ae06b39a4a75540fed39392d5c (patch) | |
tree | 00216066011ae35aeac862cda25072ae4b8693df /src/main | |
parent | 8b9074084f336467f8a623f6c710f80324abe362 (diff) |
Assign properties to variables to debug
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java | 7 |
1 files changed, 6 insertions, 1 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 09c7134..e8d521a 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java @@ -31,8 +31,13 @@ public class GitMergeController { action = " did a " + mergeMsg.getObjectKind() + " from "; // return "gitlab"; } + + String user = mergeMsg.getUser().getUsername(); + String source = mergeMsg.getObjectAttributes().getSourceBranch(); + String target = mergeMsg.getObjectAttributes().getTargetBranch(); + String url = mergeMsg.getUrl(); //DANGER - Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + mergeMsg.getUser().getUserName() + action + mergeMsg.getObjectAttributes().getSourceBranch() + " to " + mergeMsg.getObjectAttributes().getTargetBranch() + ": " + mergeMsg.getUrl() + " | bash /home/smsd/msgrelay.bash "}); + 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"); |