summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-07-17 15:57:10 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-17 15:57:10 +0000
commit10bd800297ee9cca53566ae3f021a73e22e2b803 (patch)
treebe87e98505a5bd17c19a7050aef95da8dc41fd0c /doc
parent05bef3c67a06cfea6553078f6d4e3882f5d03d0e (diff)
parentfc580935ca2171d4f5628818aa4826fbce4a7261 (diff)
downloadgitlab-ce-10bd800297ee9cca53566ae3f021a73e22e2b803.tar.gz
Merge branch 'satishperala/gitlab-ce-20720_webhooks_full_image_url' into 'master'
Include full image URL in webhooks for uploaded images Closes #20720 See merge request gitlab-org/gitlab-ce!18109
Diffstat (limited to 'doc')
-rw-r--r--doc/user/project/integrations/webhooks.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md
index 8c09927e2df..8e486318980 100644
--- a/doc/user/project/integrations/webhooks.md
+++ b/doc/user/project/integrations/webhooks.md
@@ -10,6 +10,13 @@ Starting from GitLab 8.5:
Starting from GitLab 11.1, the logs of web hooks are automatically removed after
one month.
+>**Note**
+Starting from GitLab 11.2:
+- The `description` field for issues, merge requests, comments, and wiki pages
+ is rewritten so that simple Markdown image references (like
+ `![](/uploads/...)`) have their target URL changed to an absolute URL. See
+ [image URL rewriting](#image-url-rewriting) for more details.
+
Project webhooks allow you to trigger a URL if for example new code is pushed or
a new issue is created. You can configure webhooks to listen for specific events
like pushes, issues or merge requests. GitLab will send a POST request with data
@@ -1125,6 +1132,27 @@ X-Gitlab-Event: Build Hook
}
```
+## Image URL rewriting
+
+From GitLab 11.2, simple image references are rewritten to use an absolute URL
+in webhooks. So if an image, merge request, comment, or wiki page has this in
+its description:
+
+```markdown
+![image](/uploads/$sha/image.png)
+```
+
+It will appear in the webhook body as the below (assuming that GitLab is
+installed at gitlab.example.com):
+
+```markdown
+![image](https://gitlab.example.com/uploads/$sha/image.png)
+```
+
+This will not rewrite URLs that already are pointing to HTTP, HTTPS, or
+protocol-relative URLs. It will also not rewrite image URLs using advanced
+Markdown features, like link labels.
+
## Testing webhooks
You can trigger the webhook manually. Sample data from the project will be used.Sample data will take from the project.