{"action":"created","issue":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9605","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9605/labels{/name}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9605/comments","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9605/events","html_url":"https://github.com/gitlabhq/gitlabhq/issues/9605","id":104945505,"number":9605,"title":"Issue comment webhooks contain duplicate subdirectory in URL when relative_url_root set","user":{"login":"mattkaar","id":214349,"avatar_url":"https://avatars.githubusercontent.com/u/214349?v=3","gravatar_id":"","url":"https://api.github.com/users/mattkaar","html_url":"https://github.com/mattkaar","followers_url":"https://api.github.com/users/mattkaar/followers","following_url":"https://api.github.com/users/mattkaar/following{/other_user}","gists_url":"https://api.github.com/users/mattkaar/gists{/gist_id}","starred_url":"https://api.github.com/users/mattkaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattkaar/subscriptions","organizations_url":"https://api.github.com/users/mattkaar/orgs","repos_url":"https://api.github.com/users/mattkaar/repos","events_url":"https://api.github.com/users/mattkaar/events{/privacy}","received_events_url":"https://api.github.com/users/mattkaar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-04T18:39:43Z","updated_at":"2015-09-04T18:49:00Z","closed_at":null,"body":"## Summary\r\n\r\nWhen `config.relative_url_root` is set according to [these instructions](https://github.com/gitlabhq/gitlabhq/blob/7-14-stable/config/application.rb#L55), issue comment URLs inside webhooks contain a duplicate subdirectory.\r\n\r\n## Steps to Reproduce\r\n\r\n1. Install omnibus-gitlab v7.14.1 and set `config.relative_url_root = \"/gitlab\"` by editing the necessary files listed in [config/application.rb](https://github.com/gitlabhq/gitlabhq/blob/7-14-stable/config/application.rb#L55).\r\n\r\n2. Create a test project.\r\n\r\n3. Enable a new webhook under **Settings &rarr; Web Hooks** for that project (I used http://requestb.in/ as a temporary endpoint). Enable **all triggers** for this webhook.\r\n\r\n4. Create a test issue inside that project and a test comment inside that issue. That should fire the webhook.\r\n\r\n5. The `object_attributes.url` property inside the comment webhook request will have the `relative_url_root` directory duplicated:\r\n\r\n```json\r\n{\r\n...\r\n   \"object_attributes\": {\r\n      \"id\": 1,\r\n      \"note\": \"test comment\",\r\n      \"noteable_type\": \"Issue\",\r\n      \"author_id\": 1,\r\n      \"created_at\": \"2015-09-04 17:07:19 UTC\",\r\n      \"updated_at\": \"2015-09-04 17:07:19 UTC\",\r\n      \"project_id\": 1,\r\n      \"attachment\": null,\r\n      \"line_code\": null,\r\n      \"commit_id\": \"\",\r\n      \"noteable_id\": 1,\r\n      \"system\": false,\r\n      \"st_diff\": null,\r\n      \"updated_by_id\": null,\r\n      \"url\": \"http://ubuntu.vagrant.local/gitlab/gitlab/root/test/issues/1#note_1\"\r\n   }\r\n...\r\n}\r\n```\r\n\r\nTested with [omnibus-gitlab](https://gitlab.com/gitlab-org/omnibus-gitlab) and [sameersbn/docker-gitlab](https://github.com/sameersbn/docker-gitlab) (both v7.14.1).\r\n"},"comment":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/comments/137818962","html_url":"https://github.com/gitlabhq/gitlabhq/issues/9605#issuecomment-137818962","issue_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9605","id":137818962,"user":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T18:49:00Z","updated_at":"2015-09-04T18:49:00Z","body":"Possibly related:\r\n\r\nhttps://gitlab.com/gitlab-org/gitlab-ce/issues/1728\r\n\r\nLooking into this."}}