{"action":"created","comment":{"url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/comments/59973556","id":59973556,"diff_hunk":"@@ -106,6 +112,20 @@ def publish(self, topic, **msg):\n         msg['agent'] = currently_logged_in_user()\n         fedmsg.publish(modname='trac', topic=topic, msg=msg)\n \n+    def attachment_added(self, attachment):\n+        self.publish(topic='attachment.added',\n+                     attachment=attachment2dict(attachment))\n+\n+    def attachment_deleted(self, attachment):\n+        self.publish(topic='attachment.deleted',\n+                     attachment=attachment2dict(attachment))\n+\n+    def attachment_reparented(self, attachment, old_parent_realm, old_parent_id):\n+        self.publish(topic='attachment.reparented',","path":"trac_fedmsg_plugin.py","position":38,"original_position":38,"commit_id":"d7670bd80874770476752b8f422e42fcbceb46fc","original_commit_id":"d7670bd80874770476752b8f422e42fcbceb46fc","user":{"login":"pypingou","id":1240038,"avatar_url":"https://avatars.githubusercontent.com/u/1240038?v=3","gravatar_id":"","url":"https://api.github.com/users/pypingou","html_url":"https://github.com/pypingou","followers_url":"https://api.github.com/users/pypingou/followers","following_url":"https://api.github.com/users/pypingou/following{/other_user}","gists_url":"https://api.github.com/users/pypingou/gists{/gist_id}","starred_url":"https://api.github.com/users/pypingou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypingou/subscriptions","organizations_url":"https://api.github.com/users/pypingou/orgs","repos_url":"https://api.github.com/users/pypingou/repos","events_url":"https://api.github.com/users/pypingou/events{/privacy}","received_events_url":"https://api.github.com/users/pypingou/received_events","type":"User","site_admin":false},"body":"oh, ok","created_at":"2016-04-16T20:37:27Z","updated_at":"2016-04-16T20:37:27Z","html_url":"https://github.com/fedora-infra/trac-fedmsg-plugin/pull/8#discussion_r59973556","pull_request_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/comments/59973556"},"html":{"href":"https://github.com/fedora-infra/trac-fedmsg-plugin/pull/8#discussion_r59973556"},"pull_request":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8","id":66735626,"html_url":"https://github.com/fedora-infra/trac-fedmsg-plugin/pull/8","diff_url":"https://github.com/fedora-infra/trac-fedmsg-plugin/pull/8.diff","patch_url":"https://github.com/fedora-infra/trac-fedmsg-plugin/pull/8.patch","issue_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/8","number":8,"state":"open","locked":false,"title":"Add attachments and small fix","user":{"login":"puiterwijk","id":967561,"avatar_url":"https://avatars.githubusercontent.com/u/967561?v=3","gravatar_id":"","url":"https://api.github.com/users/puiterwijk","html_url":"https://github.com/puiterwijk","followers_url":"https://api.github.com/users/puiterwijk/followers","following_url":"https://api.github.com/users/puiterwijk/following{/other_user}","gists_url":"https://api.github.com/users/puiterwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/puiterwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puiterwijk/subscriptions","organizations_url":"https://api.github.com/users/puiterwijk/orgs","repos_url":"https://api.github.com/users/puiterwijk/repos","events_url":"https://api.github.com/users/puiterwijk/events{/privacy}","received_events_url":"https://api.github.com/users/puiterwijk/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-16T11:32:12Z","updated_at":"2016-04-16T20:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07a2be11546ece015c8b0c80ff174302eaa2a400","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8/commits","review_comments_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8/comments","review_comment_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/8/comments","statuses_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/statuses/d7670bd80874770476752b8f422e42fcbceb46fc","head":{"label":"fedora-infra:add-attachments","ref":"add-attachments","sha":"d7670bd80874770476752b8f422e42fcbceb46fc","user":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"repo":{"id":9903997,"name":"trac-fedmsg-plugin","full_name":"fedora-infra/trac-fedmsg-plugin","owner":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedora-infra/trac-fedmsg-plugin","description":"Emit fedmsg messages from trac","fork":false,"url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin","forks_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/forks","keys_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/teams","hooks_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/hooks","issue_events_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/events","assignees_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/tags","blobs_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/languages","stargazers_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/stargazers","contributors_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/contributors","subscribers_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/subscribers","subscription_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/subscription","commits_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/merges","archive_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/downloads","issues_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/labels{/name}","releases_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/deployments","created_at":"2013-05-07T04:39:30Z","updated_at":"2016-04-06T10:42:23Z","pushed_at":"2016-04-16T11:32:13Z","git_url":"git://github.com/fedora-infra/trac-fedmsg-plugin.git","ssh_url":"git@github.com:fedora-infra/trac-fedmsg-plugin.git","clone_url":"https://github.com/fedora-infra/trac-fedmsg-plugin.git","svn_url":"https://github.com/fedora-infra/trac-fedmsg-plugin","homepage":null,"size":19,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":3,"default_branch":"develop"}},"base":{"label":"fedora-infra:develop","ref":"develop","sha":"75eed176ffcf22caf9d80da7eeb18f083f134ad8","user":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"repo":{"id":9903997,"name":"trac-fedmsg-plugin","full_name":"fedora-infra/trac-fedmsg-plugin","owner":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedora-infra/trac-fedmsg-plugin","description":"Emit fedmsg messages from trac","fork":false,"url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin","forks_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/forks","keys_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/teams","hooks_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/hooks","issue_events_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/events","assignees_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/tags","blobs_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/languages","stargazers_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/stargazers","contributors_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/contributors","subscribers_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/subscribers","subscription_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/subscription","commits_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/merges","archive_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/downloads","issues_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/labels{/name}","releases_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/deployments","created_at":"2013-05-07T04:39:30Z","updated_at":"2016-04-06T10:42:23Z","pushed_at":"2016-04-16T11:32:13Z","git_url":"git://github.com/fedora-infra/trac-fedmsg-plugin.git","ssh_url":"git@github.com:fedora-infra/trac-fedmsg-plugin.git","clone_url":"https://github.com/fedora-infra/trac-fedmsg-plugin.git","svn_url":"https://github.com/fedora-infra/trac-fedmsg-plugin","homepage":null,"size":19,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8"},"html":{"href":"https://github.com/fedora-infra/trac-fedmsg-plugin/pull/8"},"issue":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/8"},"comments":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/fedora-infra/trac-fedmsg-plugin/statuses/d7670bd80874770476752b8f422e42fcbceb46fc"}}}}