{"action":"created","issue":{"url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/issues/1","repository_url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat","labels_url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/issues/1/comments","events_url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/issues/1/events","html_url":"https://github.com/tmeinlschmidt/eye-hipchat/pull/1","id":202330752,"number":1,"title":"Dup default message before replacing variables so we don't mutate the default message","user":{"login":"cgunther","id":107416,"avatar_url":"https://avatars.githubusercontent.com/u/107416?v=3","gravatar_id":"","url":"https://api.github.com/users/cgunther","html_url":"https://github.com/cgunther","followers_url":"https://api.github.com/users/cgunther/followers","following_url":"https://api.github.com/users/cgunther/following{/other_user}","gists_url":"https://api.github.com/users/cgunther/gists{/gist_id}","starred_url":"https://api.github.com/users/cgunther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgunther/subscriptions","organizations_url":"https://api.github.com/users/cgunther/orgs","repos_url":"https://api.github.com/users/cgunther/repos","events_url":"https://api.github.com/users/cgunther/events{/privacy}","received_events_url":"https://api.github.com/users/cgunther/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-21T18:11:27Z","updated_at":"2017-01-23T15:12:11Z","closed_at":"2017-01-21T20:18:37Z","pull_request":{"url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/pulls/1","html_url":"https://github.com/tmeinlschmidt/eye-hipchat/pull/1","diff_url":"https://github.com/tmeinlschmidt/eye-hipchat/pull/1.diff","patch_url":"https://github.com/tmeinlschmidt/eye-hipchat/pull/1.patch"},"body":"I was noticing that every time eye notified hipchat of a process restarting because the memory limit was exceeded, the message showed the same samples of memory usage and had the same timestamp.\r\n\r\n[8:12 AM] Eye Bot: sidekiq on hostname Bounded memory(<500Mb): [*500Mb, *502Mb, *503Mb] send to [:restart] at 16 Jan 05:49.\r\n[8:18 AM] Eye Bot: sidekiq on hostname Bounded memory(<500Mb): [*500Mb, *502Mb, *503Mb] send to [:restart] at 16 Jan 05:49.\r\n\r\nNotice the timestamps at the beginning of the line that come from hipchat don't match the timestamps on the end of the line coming from eye-hipchat.\r\n\r\nLooks like replacing the variables previously mutated the default message such that it no longer contained placeholders but rather their filled-in values from the first notification. Then subsequent notifications would send a message identical to the first notification since there were no longer any placeholders to replace.\r\n\r\nDup-ing the default message first allows us to replace the variables only for that notification without affecting the default message.\r\n\r\nThanks for eye-hipchat!"},"comment":{"url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/issues/comments/274513463","html_url":"https://github.com/tmeinlschmidt/eye-hipchat/pull/1#issuecomment-274513463","issue_url":"https://api.github.com/repos/tmeinlschmidt/eye-hipchat/issues/1","id":274513463,"user":{"login":"cgunther","id":107416,"avatar_url":"https://avatars.githubusercontent.com/u/107416?v=3","gravatar_id":"","url":"https://api.github.com/users/cgunther","html_url":"https://github.com/cgunther","followers_url":"https://api.github.com/users/cgunther/followers","following_url":"https://api.github.com/users/cgunther/following{/other_user}","gists_url":"https://api.github.com/users/cgunther/gists{/gist_id}","starred_url":"https://api.github.com/users/cgunther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgunther/subscriptions","organizations_url":"https://api.github.com/users/cgunther/orgs","repos_url":"https://api.github.com/users/cgunther/repos","events_url":"https://api.github.com/users/cgunther/events{/privacy}","received_events_url":"https://api.github.com/users/cgunther/received_events","type":"User","site_admin":false},"created_at":"2017-01-23T15:12:11Z","updated_at":"2017-01-23T15:12:11Z","body":"Thanks for the quick merge and release!"}}
{"actor":{"display_login":"cgunther"}}