{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/alertmanager/issues/62","labels_url":"https://api.github.com/repos/prometheus/alertmanager/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/alertmanager/issues/62/comments","events_url":"https://api.github.com/repos/prometheus/alertmanager/issues/62/events","html_url":"https://github.com/prometheus/alertmanager/pull/62","id":79538559,"number":62,"title":"Added support for @mentions in HipChat notifications","user":{"login":"SQiShER","id":369730,"avatar_url":"https://avatars.githubusercontent.com/u/369730?v=3","gravatar_id":"","url":"https://api.github.com/users/SQiShER","html_url":"https://github.com/SQiShER","followers_url":"https://api.github.com/users/SQiShER/followers","following_url":"https://api.github.com/users/SQiShER/following{/other_user}","gists_url":"https://api.github.com/users/SQiShER/gists{/gist_id}","starred_url":"https://api.github.com/users/SQiShER/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SQiShER/subscriptions","organizations_url":"https://api.github.com/users/SQiShER/orgs","repos_url":"https://api.github.com/users/SQiShER/repos","events_url":"https://api.github.com/users/SQiShER/events{/privacy}","received_events_url":"https://api.github.com/users/SQiShER/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-22T17:25:09Z","updated_at":"2015-05-23T09:37:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/prometheus/alertmanager/pulls/62","html_url":"https://github.com/prometheus/alertmanager/pull/62","diff_url":"https://github.com/prometheus/alertmanager/pull/62.diff","patch_url":"https://github.com/prometheus/alertmanager/pull/62.patch"},"body":"Hi! So I was planning to pester my fellow co-workers with HipChat notifications, whenever Prometheus fires alerts. In order to do so, I needed a way to add `@all` or `@somename` to the message body. (I know there is a notify flag, but that didn't seem to work as well and doesn't allow to target specific people or groups like `all` or `here`.) \r\n\r\nThe alertmanager sends HipChat notifications in HTML format. This opens the door for nicely formatted messages, but also has the consequence, that @mentions don't work. (For some strange reason, that only Atlassian knows...)\r\n\r\nHere is an excerpt from the `message_format` section of the HipChat documentation:\r\n\r\n> * html - Message is rendered as HTML and receives no special treatment. Must be valid HTML and entities must be escaped (e.g.: '&amp;' instead of '&'). May contain basic tags: a, b, i, strong, em, br, img, pre, code, lists, tables.\r\n> * text - Message is treated just like a message sent by a user. Can include @mentions, emoticons, pastes, and auto-detected URLs (Twitter, YouTube, images, etc).\r\n\r\nIn order to make it possible to use mentions, I added two new properties to the configuration: `message_format` (which can be `text` or `html`) and `prefix`, which is a free-form text that's simply prepended to the message.\r\n\r\nIn order to keep it backward-compatible `html` remains the default and both new properties are optional. However, if present, the `prefix` will also be applied to the HTML message.\r\n\r\nI'd love to see this change make its way into master. If you have any concerns or know a better way to achieve the same result, please let me know! Also, since I'm new to Go and Protobuf please let me know, if there is anything I should change about the code.\r\n\r\nBest regards,\r\nDaniel"},"comment":{"url":"https://api.github.com/repos/prometheus/alertmanager/issues/comments/104875059","html_url":"https://github.com/prometheus/alertmanager/pull/62#issuecomment-104875059","issue_url":"https://api.github.com/repos/prometheus/alertmanager/issues/62","id":104875059,"user":{"login":"juliusv","id":538008,"avatar_url":"https://avatars.githubusercontent.com/u/538008?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusv","html_url":"https://github.com/juliusv","followers_url":"https://api.github.com/users/juliusv/followers","following_url":"https://api.github.com/users/juliusv/following{/other_user}","gists_url":"https://api.github.com/users/juliusv/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusv/subscriptions","organizations_url":"https://api.github.com/users/juliusv/orgs","repos_url":"https://api.github.com/users/juliusv/repos","events_url":"https://api.github.com/users/juliusv/events{/privacy}","received_events_url":"https://api.github.com/users/juliusv/received_events","type":"User","site_admin":false},"created_at":"2015-05-23T09:37:11Z","updated_at":"2015-05-23T09:37:11Z","body":"@brian-brazil :+1: in general for templating of message texts, but for the particular feature in this PR to work, the actual JSON of the HipChat API request would have to be generated by a template - that seems a bit intense."}}