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
ADD hubot-scripts.json /hubot/
ADD external-scripts.json /hubot/
ADD scripts/hubot-jira-issues.coffee /hubot/scripts/
ADD scripts/hubot-gitlab.coffee /hubot/scripts/
EXPOSE 8080
......
......@@ -91,9 +91,7 @@ module.exports = (robot) ->
when "issue"
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"
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)}"
if hook.object_attributes.description
robot.send user, ">> #{hook.object_attributes.description}"
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}"
robot.router.post "/gitlab/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