{"action":"created","issue":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/1055","repository_url":"https://api.github.com/repos/os-autoinst/openQA","labels_url":"https://api.github.com/repos/os-autoinst/openQA/issues/1055/labels{/name}","comments_url":"https://api.github.com/repos/os-autoinst/openQA/issues/1055/comments","events_url":"https://api.github.com/repos/os-autoinst/openQA/issues/1055/events","html_url":"https://github.com/os-autoinst/openQA/pull/1055","id":192721563,"number":1055,"title":"Fix various issues with fedmsg comment events","user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-01T00:27:41Z","updated_at":"2016-12-01T08:45:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/os-autoinst/openQA/pulls/1055","html_url":"https://github.com/os-autoinst/openQA/pull/1055","diff_url":"https://github.com/os-autoinst/openQA/pull/1055.diff","patch_url":"https://github.com/os-autoinst/openQA/pull/1055.patch"},"body":"Now I got around to checking on the comment events that were\r\nadded to the Fedmsg plugin, there are several problems. This\r\nshould fix most of them.\r\n\r\nThe modname for the comment events was entirely wrong, because\r\nthe modifications done for job events weren't being done for\r\ncomment events, so we got a modname with the useless 'openqa'\r\non the front and still with underscore separators instead of\r\ndots. As a bonus, we now replace *all* underscores with dots,\r\nnot just the first (so `job_update_result` was actually also\r\nbroken before, I just didn't notice because we never much used\r\nit).\r\n\r\nWe would never actually emit a message for comment deletion,\r\nbecause `on_comment_event` tries to find the comment and bails\r\nif it can't; obviously it won't find a comment that was just\r\ndeleted. For now, just send out a very bare message in this\r\ncase that includes only the comment ID; we could make this\r\nbetter, I think, but it would make more sense as a separate\r\ncommit.\r\n\r\n`on_comment_event` also lied about what its args were. The\r\nfirst arg is the user ID, not the comment ID.\r\n\r\nNo tests were included in the initial commit. If it had had any,\r\nthese errors would've been much more obvious. I wrote some."},"comment":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/comments/264113630","html_url":"https://github.com/os-autoinst/openQA/pull/1055#issuecomment-264113630","issue_url":"https://api.github.com/repos/os-autoinst/openQA/issues/1055","id":264113630,"user":{"login":"Martchus","id":10248953,"avatar_url":"https://avatars.githubusercontent.com/u/10248953?v=3","gravatar_id":"","url":"https://api.github.com/users/Martchus","html_url":"https://github.com/Martchus","followers_url":"https://api.github.com/users/Martchus/followers","following_url":"https://api.github.com/users/Martchus/following{/other_user}","gists_url":"https://api.github.com/users/Martchus/gists{/gist_id}","starred_url":"https://api.github.com/users/Martchus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martchus/subscriptions","organizations_url":"https://api.github.com/users/Martchus/orgs","repos_url":"https://api.github.com/users/Martchus/repos","events_url":"https://api.github.com/users/Martchus/events{/privacy}","received_events_url":"https://api.github.com/users/Martchus/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T08:45:38Z","updated_at":"2016-12-01T08:45:38Z","body":"When implementing the RabbitMQ support we decided to just return the ID, also for deletion. However, the event is now emitted before the actual deletion, so you still have access to the comment in the plugin.\r\n\r\nSo if https://github.com/os-autoinst/openQA/pull/1032 is finally merged you can use `$comment->hash` also on deletion."}}
{"actor":{"display_login":"Martchus"}}