diff options
author | Sean McGivern <sean@gitlab.com> | 2018-10-15 13:42:15 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-10-16 12:54:49 +0300 |
commit | 0bcfd0adb303f0fcaac40b703deda49f3dd683f4 (patch) | |
tree | dc4f44b2019a47e577bf75a7f2964d14a6655c1d /doc/user/project/integrations | |
parent | c7fd95584eb2a595d84a5693a14b4b46c2885251 (diff) |
Fix image webhook rewriting for uploads
This rewrote URLs to be absolute URLs. However, for uploads (the most
common case), we actually need them to point to not just the GitLab
instance, but the project they're from. Thankfully, we can normally get
that information from the object we're building the hook for.
Diffstat (limited to 'doc/user/project/integrations')
-rw-r--r-- | doc/user/project/integrations/webhooks.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md index 7d12cd8f7c2..02c18c7cbd7 100644 --- a/doc/user/project/integrations/webhooks.md +++ b/doc/user/project/integrations/webhooks.md @@ -73,8 +73,8 @@ Below are described the supported events. Triggered when you push to the repository except when pushing tags. -> **Note:** When more than 20 commits are pushed at once, the `commits` web hook - attribute will only contain the first 20 for performance reasons. Loading +> **Note:** When more than 20 commits are pushed at once, the `commits` web hook + attribute will only contain the first 20 for performance reasons. Loading detailed commit data is expensive. Note that despite only 20 commits being present in the `commits` attribute, the `total_commits_count` attribute will contain the actual total. @@ -1157,10 +1157,11 @@ its description: ``` It will appear in the webhook body as the below (assuming that GitLab is -installed at gitlab.example.com): +installed at gitlab.example.com, and the project is at +example-group/example-project): ```markdown -![image](https://gitlab.example.com/uploads/$sha/image.png) +![image](https://gitlab.example.com/example-group/example-project/uploads/$sha/image.png) ``` This will not rewrite URLs that already are pointing to HTTP, HTTPS, or |