diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-23 01:10:57 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-23 01:10:57 +0200 |
commit | 3ff131a747834f6ef481a6fa8ee663fea3fac93b (patch) | |
tree | 90c92e466f989e9362c606c1d80b2adc6e06bc42 | |
parent | 0af5884bcdd0f1ef7827a9493422cd6aad876219 (diff) | |
download | gitlab-ce-3ff131a747834f6ef481a6fa8ee663fea3fac93b.tar.gz |
Improve web hook data. Use clonable url in repo info
-rw-r--r-- | app/roles/push_observer.rb | 2 | ||||
-rw-r--r-- | app/views/hooks/_data_ex.html.erb | 4 | ||||
-rw-r--r-- | spec/models/project_hooks_spec.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/roles/push_observer.rb b/app/roles/push_observer.rb index dda18267207..dd33b6ebaee 100644 --- a/app/roles/push_observer.rb +++ b/app/roles/push_observer.rb @@ -98,7 +98,7 @@ module PushObserver user_name: user.name, repository: { name: name, - url: web_url, + url: url_to_repo, description: description, homepage: web_url, }, diff --git a/app/views/hooks/_data_ex.html.erb b/app/views/hooks/_data_ex.html.erb index 7dd6b9e0750..4d49ee2f0ee 100644 --- a/app/views/hooks/_data_ex.html.erb +++ b/app/views/hooks/_data_ex.html.erb @@ -7,9 +7,9 @@ :user_name => "John Smith", :repository => { :name => "Diaspora", - :url => "localhost/diaspora", + :url => "git@localhost/diaspora.git", :description => "", - :homepage => "localhost/diaspora", + :homepage => "http://localhost/diaspora", :private => true }, :commits => [ diff --git a/spec/models/project_hooks_spec.rb b/spec/models/project_hooks_spec.rb index df6a3831e30..77adfe06cff 100644 --- a/spec/models/project_hooks_spec.rb +++ b/spec/models/project_hooks_spec.rb @@ -91,7 +91,7 @@ describe Project, "Hooks" do subject { @data[:repository] } it { should include(name: project.name) } - it { should include(url: project.web_url) } + it { should include(url: project.url_to_repo) } it { should include(description: project.description) } it { should include(homepage: project.web_url) } end |