Commit 9ed59ee9f00ec31564f4f1f069f1cdcc7d78281b
1 parent
1073019d
Exists in
master
and in
4 other branches
Include project_id in webhook payload.
Showing
3 changed files
with
4 additions
and
0 deletions
Show diff stats
app/services/git_push_service.rb
... | ... | @@ -112,6 +112,7 @@ class GitPushService |
112 | 112 | # ref: String, |
113 | 113 | # user_id: String, |
114 | 114 | # user_name: String, |
115 | + # project_id: String, | |
115 | 116 | # repository: { |
116 | 117 | # name: String, |
117 | 118 | # url: String, |
... | ... | @@ -136,6 +137,7 @@ class GitPushService |
136 | 137 | ref: ref, |
137 | 138 | user_id: user.id, |
138 | 139 | user_name: user.name, |
140 | + project_id: project.id, | |
139 | 141 | repository: { |
140 | 142 | name: project.name, |
141 | 143 | url: project.url_to_repo, | ... | ... |
app/views/projects/hooks/_data_ex.html.erb
spec/services/git_push_service_spec.rb
... | ... | @@ -26,6 +26,7 @@ describe GitPushService do |
26 | 26 | it { should include(ref: @ref) } |
27 | 27 | it { should include(user_id: user.id) } |
28 | 28 | it { should include(user_name: user.name) } |
29 | + it { should include(project_id: project.id) } | |
29 | 30 | |
30 | 31 | context "with repository data" do |
31 | 32 | subject { @push_data[:repository] } | ... | ... |