summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/uk/co/blatech/blaears/controllers/GitMergeController.java2
-rw-r--r--src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java4
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");