diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-10 23:28:17 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-10 23:28:17 +0000 |
commit | de928d15cdfc50d5165b2dc393b015ccf0b97735 (patch) | |
tree | 6b2b9e5a3634ff96ed0f170144196f84917d6ed9 /src | |
parent | b8bf8d6b49f1c220095f2768fcfa6d48264d9b42 (diff) |
Add catch-all action for debugging
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java | 5 |
1 files changed, 3 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 5622aea..09c7134 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java @@ -28,10 +28,11 @@ public class GitMergeController { } else if (mergeMsg.getObjectKind().equals("merge")) { action = " merged from branch "; } else { - return "gitlab"; + action = " did a " + mergeMsg.getObjectKind() + " from "; +// return "gitlab"; } //DANGER - Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + mergeMsg.getUser().getUserName()+ " created a merge request from " + mergeMsg.getObjectAttributes().getSourceBranch() + " to " + mergeMsg.getObjectAttributes().getTargetBranch() + ": " + mergeMsg.getUrl() + " | bash /home/smsd/msgrelay.bash "}); + 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 "}); model.addAttribute("result", "OK"); } catch (IOException e) { System.out.println("Failed to run command"); |