diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-05 17:51:08 +0100 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-05 17:51:49 +0100 |
commit | e4a38e447169069f3d5042d3341ceb4bdc51bf1b (patch) | |
tree | 670d9e03ffed0001511c954250fe5ac43544c136 /app/models/project_services | |
parent | f9814bf28831aeef746cfdc35431c8de45ff7677 (diff) | |
download | gitlab-ce-e4a38e447169069f3d5042d3341ceb4bdc51bf1b.tar.gz |
Factor using Repository#path_to_repo
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/flowdock_service.rb | 3 | ||||
-rw-r--r-- | app/models/project_services/gemnasium_service.rb | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/models/project_services/flowdock_service.rb b/app/models/project_services/flowdock_service.rb index 0020b4482e5..86705f5dabd 100644 --- a/app/models/project_services/flowdock_service.rb +++ b/app/models/project_services/flowdock_service.rb @@ -37,13 +37,12 @@ class FlowdockService < Service end def execute(push_data) - repo_path = File.join(Gitlab.config.gitlab_shell.repos_path, "#{project.path_with_namespace}.git") Flowdock::Git.post( push_data[:ref], push_data[:before], push_data[:after], token: token, - repo: repo_path, + repo: project.repository.path_to_repo, repo_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}", commit_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/commit/%s", diff_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/compare/%s...%s", diff --git a/app/models/project_services/gemnasium_service.rb b/app/models/project_services/gemnasium_service.rb index 6d2fc06a5d0..18fdd204ecd 100644 --- a/app/models/project_services/gemnasium_service.rb +++ b/app/models/project_services/gemnasium_service.rb @@ -38,14 +38,13 @@ class GemnasiumService < Service end def execute(push_data) - repo_path = File.join(Gitlab.config.gitlab_shell.repos_path, "#{project.path_with_namespace}.git") Gemnasium::GitlabService.execute( ref: push_data[:ref], before: push_data[:before], after: push_data[:after], token: token, api_key: api_key, - repo: repo_path + repo: project.repository.path_to_repo ) end end |