Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-11-20 23:05:56 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-11-21 19:11:44 +0300
commit0df5340036c3510bc7bad77c4db4704f40f2621e (patch)
tree2a283f5cd4d1eb01a8f620a609ba87007ca1af20 /app
parentae36d23497cf1f51e573524c1ef9477375c0f528 (diff)
Merge branch 'fix-drone-service-hook' into 'master'
Fix Drone web hook URL not being updated Fixes regression of !1774: fixes Drone Web hook for both service templates and project services. See merge request !1856
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/drone_ci_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project_services/drone_ci_service.rb b/app/models/project_services/drone_ci_service.rb
index c240213200d..127684bd274 100644
--- a/app/models/project_services/drone_ci_service.rb
+++ b/app/models/project_services/drone_ci_service.rb
@@ -32,6 +32,8 @@ class DroneCiService < CiService
def compose_service_hook
hook = service_hook || build_service_hook
+ # If using a service template, project may not be available
+ hook.url = [drone_url, "/api/hook", "?owner=#{project.namespace.path}", "&name=#{project.path}", "&access_token=#{token}"].join if project
hook.enable_ssl_verification = enable_ssl_verification
hook.save
end