diff options
author | Kirill Zaitsev <kirik910@gmail.com> | 2016-02-06 17:20:21 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-11 17:22:11 +0100 |
commit | b123171d3da752c084ef7bfa82dbed962b3e5168 (patch) | |
tree | 8a31350c2d57776b6e174ccb03c2556b873a1bc4 /app/models/project.rb | |
parent | 9b1dfd3e81855c99b0ccb703d3aecc3f1a7ac7c9 (diff) | |
download | gitlab-ce-b123171d3da752c084ef7bfa82dbed962b3e5168.tar.gz |
Add new data to project in push, issue, merge-request and note webhooks databugagazavr/gitlab-ce-extend-hooks
- Add `avatar_url`, `description`, `git_ssh_url`, `git_http_url`,
`path_with_namespace` and `default_branch` in `project` in push, issue,
merge-request and note webhooks data
- Deprecate the `ssh_url` in favor of `git_ssh_url` and `http_url` in
favor of `git_http_url` in `project` for push, issue, merge-request and
note webhooks data
- Deprecate the `repository` key in push, issue, merge-request and
note webhooks data, use `project` instead
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index f11c6d7c6be..649e331b7a9 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -738,11 +738,20 @@ class Project < ActiveRecord::Base def hook_attrs { name: name, - ssh_url: ssh_url_to_repo, - http_url: http_url_to_repo, + description: description, web_url: web_url, + avatar_url: avatar_url, + git_ssh_url: ssh_url_to_repo, + git_http_url: http_url_to_repo, namespace: namespace.name, - visibility_level: visibility_level + visibility_level: visibility_level, + path_with_namespace: path_with_namespace, + default_branch: default_branch, + # Backward compatibility + homepage: web_url, + url: url_to_repo, + ssh_url: ssh_url_to_repo, + http_url: http_url_to_repo } end |