Commit 4c8a1cbd authored by Ricardo Rocha's avatar Ricardo Rocha
Browse files

customize the gitlab merge request msg.

parent a9b6cc83
...@@ -30,6 +30,7 @@ RUN npm install hubot-gitlab-hooks --save && npm install ...@@ -30,6 +30,7 @@ RUN npm install hubot-gitlab-hooks --save && npm install
ADD hubot-scripts.json /hubot/ ADD hubot-scripts.json /hubot/
ADD external-scripts.json /hubot/ ADD external-scripts.json /hubot/
ADD scripts/hubot-jira-issues.coffee /hubot/scripts/ ADD scripts/hubot-jira-issues.coffee /hubot/scripts/
ADD scripts/hubot-gitlab.coffee /hubot/scripts/
EXPOSE 8080 EXPOSE 8080
......
...@@ -91,9 +91,7 @@ module.exports = (robot) -> ...@@ -91,9 +91,7 @@ module.exports = (robot) ->
when "issue" when "issue"
robot.send user, "Issue #{bold(hook.object_attributes.iid)}: #{hook.object_attributes.title} (#{hook.object_attributes.state}) at #{hook.object_attributes.url}" robot.send user, "Issue #{bold(hook.object_attributes.iid)}: #{hook.object_attributes.title} (#{hook.object_attributes.state}) at #{hook.object_attributes.url}"
when "merge_request" when "merge_request"
robot.send user, "Merge Request #{bold(hook.object_attributes.iid)}: #{hook.object_attributes.title} (#{hook.object_attributes.state}) between #{bold(hook.object_attributes.source_branch)} and #{bold(hook.object_attributes.target_branch)}" robot.send user, "#{hook.user.name} #{hook.object_attributes.state} a merge request to #{hook.object_attributes.target.namespace}/#{hook.object_attributes.target.name}: #{hook.object_attributes.title}\n#{hook.object_attributes.url}"
if hook.object_attributes.description
robot.send user, ">> #{hook.object_attributes.description}"
robot.router.post "/gitlab/system", (req, res) -> robot.router.post "/gitlab/system", (req, res) ->
handler "system", req, res handler "system", req, res
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment