From 4cca5fdada19f93039ddef9a910a43f09a7634b2 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Fri, 11 Dec 2015 00:15:15 +0000 Subject: Debug message --- .../java/uk/co/blatech/blaears/controllers/GitMergeController.java | 2 +- .../java/uk/co/blatech/blaears/controllers/GitPushController.java | 4 +++- 2 files changed, 4 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 d5cabaf..179caee 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java @@ -19,7 +19,7 @@ import java.io.IOException; public class GitMergeController { @RequestMapping(value = "/git/merge", method = RequestMethod.POST) - String relay(@RequestBody Merge mergeMsg, Model model){ + String merge(@RequestBody Merge mergeMsg, Model model){ try { String action = ""; diff --git a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java index 2e8020b..b3563cd 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java @@ -19,7 +19,7 @@ import java.io.IOException; public class GitPushController { @RequestMapping(value = "/git/push", method = RequestMethod.POST) - String relay(@RequestBody Push pushMsg, Model model){ + String push(@RequestBody Push pushMsg, Model model){ try { String commitMsg = ""; for (Commit commit: pushMsg.getCommits()) { @@ -28,6 +28,8 @@ public class GitPushController { } commitMsg += commit.getMessage(); } + Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom beep | bash /home/smsd/msgrelay.bash "}); + //DANGER Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash "}); model.addAttribute("result", "OK"); -- cgit v1.2.3