diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-08 16:10:14 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-08 16:10:14 +0000 |
commit | 4c833a1d4ead49c27f6a81e607d10a5c6f0fcc2b (patch) | |
tree | c057160830c918cb2938a7ade29397044bc53249 /app/models/project_services/slack_service/build_message.rb | |
parent | 1579cc74c9901f496d822ca30378f2c305b6b84b (diff) | |
parent | c2bcfab18af1cf9253a47d4ffd3ea48e43cd19be (diff) | |
download | gitlab-ce-4c833a1d4ead49c27f6a81e607d10a5c6f0fcc2b.tar.gz |
Merge branch 'pipeline-hooks' into 'master'
Implement Slack integration for pipeline hooks
## What does this MR do?
Add pipeline events to Slack integration
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
- [x] Added for this feature/bug
See merge request !5525
Diffstat (limited to 'app/models/project_services/slack_service/build_message.rb')
-rw-r--r-- | app/models/project_services/slack_service/build_message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project_services/slack_service/build_message.rb b/app/models/project_services/slack_service/build_message.rb index 69c21b3fc38..0fca4267bad 100644 --- a/app/models/project_services/slack_service/build_message.rb +++ b/app/models/project_services/slack_service/build_message.rb @@ -9,7 +9,7 @@ class SlackService attr_reader :user_name attr_reader :duration - def initialize(params, commit = true) + def initialize(params) @sha = params[:sha] @ref_type = params[:tag] ? 'tag' : 'branch' @ref = params[:ref] @@ -36,7 +36,7 @@ class SlackService def message "#{project_link}: Commit #{commit_link} of #{branch_link} #{ref_type} by #{user_name} #{humanized_status} in #{duration} #{'second'.pluralize(duration)}" - end + end def format(string) Slack::Notifier::LinkFormatter.format(string) |