Issue comment webhooks contain duplicate subdirectory in URL when relative_url_root set
Created by: mattkaar
Summary
When config.relative_url_root
is set according to these instructions, issue comment URLs inside webhooks contain a duplicate subdirectory.
Steps to Reproduce
- Install omnibus-gitlab v7.14.1 and set
config.relative_url_root = "/gitlab"
by editing the necessary files listed in config/application.rb. - Create a test project.
- Enable a new webhook under Settings → Web Hooks for that project (I used http://requestb.in/ as a temporary endpoint). Enable all triggers for this webhook.
- Create a test issue inside that project and a test comment inside that issue. That should fire the webhook.
- The
object_attributes.url
property inside the comment webhook request will have therelative_url_root
directory duplicated:
{
...
"object_attributes": {
"id": 1,
"note": "test comment",
"noteable_type": "Issue",
"author_id": 1,
"created_at": "2015-09-04 17:07:19 UTC",
"updated_at": "2015-09-04 17:07:19 UTC",
"project_id": 1,
"attachment": null,
"line_code": null,
"commit_id": "",
"noteable_id": 1,
"system": false,
"st_diff": null,
"updated_by_id": null,
"url": "http://ubuntu.vagrant.local/gitlab/gitlab/root/test/issues/1#note_1"
}
...
}
Tested with omnibus-gitlab and sameersbn/docker-gitlab (both v7.14.1).