GitHub PullRequestReviewCommentEvent at 2014-08-06 09:22:59
Repository: faf
Actor: mtoman
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/abrt/faf/pulls/comments/15863803","id":15863803,"diff_hunk":"@@ -0,0 +1,195 @@\n+# Copyright (C) 2014  ABRT Team\n+# Copyright (C) 2014  Red Hat, Inc.\n+#\n+# This file is part of faf.\n+#\n+# faf is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation, either version 3 of the License, or\n+# (at your option) any later version.\n+#\n+# faf is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with faf.  If not, see <http://www.gnu.org/licenses/>.\n+\n+\n+import koji\n+import json\n+from datetime import datetime\n+from pyfaf.actions import Action\n+from pyfaf.queries import (get_crashed_uknown_package_nevr_for_report,\n+                           get_crashed_package_for_report, get_problems)\n+\n+\n+class MarkProbablyFixed(Action):\n+    name = \"mark-probably-fixed\"\n+\n+    def __init__(self):\n+        super(MarkProbablyFixed, self).__init__()\n+\n+    def run(self, cmdline, db):\n+        \"\"\"\n+        Mark a problem probably fixed if there is a new build of the problem's\n+        affected package, for which no crash reports have come in.\n+        \"\"\"\n+        self.load_config_to_self(\"build_aging_days\",\n+                                 [\"mark-probably-fixed.build-aging-days\"],\n+                                 7, callback=int)\n+\n+        if cmdline.koji_json:\n+            self.log_info(\"Loading newest builds from file...\")\n+            koji_builds = json.load(open(cmdline.koji_json))\n+        else:\n+            self.log_info(\"Getting newest builds from Koji...\")\n+            self.load_config_to_self(\"koji_url\",\n+                                     [\"mark-probably-fixed.koji-url\"], None)\n+            self.load_config_to_self(\"koji_tag\",\n+                                     [\"mark-probably-fixed.koji-tag\"], None)\n+            session = koji.ClientSession(self.koji_url)\n+            koji_builds = session.listTagged(tag=self.koji_tag, inherit=True)\n+\n+        newest_builds = {}\n+        all_builds = {}\n+        now = datetime.now()\n+        for build in koji_builds:\n+            age = now - datetime.strptime(build[\"completion_time\"],\n+                                          \"%Y-%m-%d %H:%M:%S.%f\")\n+            \"\"\"\n+            If a hot new build comes out, we need to wait a certain period of\n+            time for people to use it before we can make conclusions about it\n+            being a probable fix.\n+            \"\"\"","path":"src/pyfaf/actions/mark_probably_fixed.py","position":65,"original_position":65,"commit_id":"c275737703081c2a399723e7c9f7d6006453a7cd","original_commit_id":"c275737703081c2a399723e7c9f7d6006453a7cd","user":{"login":"mtoman","id":3381936,"avatar_url":"https://avatars.githubusercontent.com/u/3381936?v=2","gravatar_id":"cd61280237293a86fce6b2ca6d40fccc","url":"https://api.github.com/users/mtoman","html_url":"https://github.com/mtoman","followers_url":"https://api.github.com/users/mtoman/followers","following_url":"https://api.github.com/users/mtoman/following{/other_user}","gists_url":"https://api.github.com/users/mtoman/gists{/gist_id}","starred_url":"https://api.github.com/users/mtoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtoman/subscriptions","organizations_url":"https://api.github.com/users/mtoman/orgs","repos_url":"https://api.github.com/users/mtoman/repos","events_url":"https://api.github.com/users/mtoman/events{/privacy}","received_events_url":"https://api.github.com/users/mtoman/received_events","type":"User","site_admin":false},"body":"Mixing comments and docstrings. This is a comment.\r\n```\r\n# comment\r\n# comment continues\r\n# comment finishes\r\n```\r\nvs.\r\n```\r\n\"\"\"\r\ndocstring\r\ndocstring continues\r\ndocstring finishes\r\n\"\"\"\r\n```","created_at":"2014-08-06T09:22:59Z","updated_at":"2014-08-06T09:22:59Z","html_url":"https://github.com/abrt/faf/pull/253#discussion_r15863803","pull_request_url":"https://api.github.com/repos/abrt/faf/pulls/253","_links":{"self":{"href":"https://api.github.com/repos/abrt/faf/pulls/comments/15863803"},"html":{"href":"https://github.com/abrt/faf/pull/253#discussion_r15863803"},"pull_request":{"href":"https://api.github.com/repos/abrt/faf/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/abrt/faf/pulls/253","id":18769555,"html_url":"https://github.com/abrt/faf/pull/253","diff_url":"https://github.com/abrt/faf/pull/253.diff","patch_url":"https://github.com/abrt/faf/pull/253.patch","issue_url":"https://api.github.com/repos/abrt/faf/issues/253","number":253,"state":"open","title":"cmdline, webui: mark probably fixed problems and their reports","user":{"login":"mbrysa","id":7789939,"avatar_url":"https://avatars.githubusercontent.com/u/7789939?v=2","gravatar_id":"0a77a142681f086f50fc782d121dd65b","url":"https://api.github.com/users/mbrysa","html_url":"https://github.com/mbrysa","followers_url":"https://api.github.com/users/mbrysa/followers","following_url":"https://api.github.com/users/mbrysa/following{/other_user}","gists_url":"https://api.github.com/users/mbrysa/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrysa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrysa/subscriptions","organizations_url":"https://api.github.com/users/mbrysa/orgs","repos_url":"https://api.github.com/users/mbrysa/repos","events_url":"https://api.github.com/users/mbrysa/events{/privacy}","received_events_url":"https://api.github.com/users/mbrysa/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-07-23T11:17:25Z","updated_at":"2014-08-06T09:22:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96dbfbeaba8e59c79571065b6e17c1def272db7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/abrt/faf/pulls/253/commits","review_comments_url":"https://api.github.com/repos/abrt/faf/pulls/253/comments","review_comment_url":"https://api.github.com/repos/abrt/faf/pulls/comments/{number}","comments_url":"https://api.github.com/repos/abrt/faf/issues/253/comments","statuses_url":"https://api.github.com/repos/abrt/faf/statuses/c275737703081c2a399723e7c9f7d6006453a7cd","head":{"label":"abrt:problem_probably_fixed","ref":"problem_probably_fixed","sha":"c275737703081c2a399723e7c9f7d6006453a7cd","user":{"login":"abrt","id":3449403,"avatar_url":"https://avatars.githubusercontent.com/u/3449403?v=2","gravatar_id":"78df71f39188ec2407d3aaa48173d106","url":"https://api.github.com/users/abrt","html_url":"https://github.com/abrt","followers_url":"https://api.github.com/users/abrt/followers","following_url":"https://api.github.com/users/abrt/following{/other_user}","gists_url":"https://api.github.com/users/abrt/gists{/gist_id}","starred_url":"https://api.github.com/users/abrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abrt/subscriptions","organizations_url":"https://api.github.com/users/abrt/orgs","repos_url":"https://api.github.com/users/abrt/repos","events_url":"https://api.github.com/users/abrt/events{/privacy}","received_events_url":"https://api.github.com/users/abrt/received_events","type":"Organization","site_admin":false},"repo":{"id":7959759,"name":"faf","full_name":"abrt/faf","owner":{"login":"abrt","id":3449403,"avatar_url":"https://avatars.githubusercontent.com/u/3449403?v=2","gravatar_id":"78df71f39188ec2407d3aaa48173d106","url":"https://api.github.com/users/abrt","html_url":"https://github.com/abrt","followers_url":"https://api.github.com/users/abrt/followers","following_url":"https://api.github.com/users/abrt/following{/other_user}","gists_url":"https://api.github.com/users/abrt/gists{/gist_id}","starred_url":"https://api.github.com/users/abrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abrt/subscriptions","organizations_url":"https://api.github.com/users/abrt/orgs","repos_url":"https://api.github.com/users/abrt/repos","events_url":"https://api.github.com/users/abrt/events{/privacy}","received_events_url":"https://api.github.com/users/abrt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/abrt/faf","description":"Platform for collection and analysis of packages and package crashes","fork":false,"url":"https://api.github.com/repos/abrt/faf","forks_url":"https://api.github.com/repos/abrt/faf/forks","keys_url":"https://api.github.com/repos/abrt/faf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abrt/faf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abrt/faf/teams","hooks_url":"https://api.github.com/repos/abrt/faf/hooks","issue_events_url":"https://api.github.com/repos/abrt/faf/issues/events{/number}","events_url":"https://api.github.com/repos/abrt/faf/events","assignees_url":"https://api.github.com/repos/abrt/faf/assignees{/user}","branches_url":"https://api.github.com/repos/abrt/faf/branches{/branch}","tags_url":"https://api.github.com/repos/abrt/faf/tags","blobs_url":"https://api.github.com/repos/abrt/faf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abrt/faf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abrt/faf/git/refs{/sha}","trees_url":"https://api.github.com/repos/abrt/faf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abrt/faf/statuses/{sha}","languages_url":"https://api.github.com/repos/abrt/faf/languages","stargazers_url":"https://api.github.com/repos/abrt/faf/stargazers","contributors_url":"https://api.github.com/repos/abrt/faf/contributors","subscribers_url":"https://api.github.com/repos/abrt/faf/subscribers","subscription_url":"https://api.github.com/repos/abrt/faf/subscription","commits_url":"https://api.github.com/repos/abrt/faf/commits{/sha}","git_commits_url":"https://api.github.com/repos/abrt/faf/git/commits{/sha}","comments_url":"https://api.github.com/repos/abrt/faf/comments{/number}","issue_comment_url":"https://api.github.com/repos/abrt/faf/issues/comments/{number}","contents_url":"https://api.github.com/repos/abrt/faf/contents/{+path}","compare_url":"https://api.github.com/repos/abrt/faf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abrt/faf/merges","archive_url":"https://api.github.com/repos/abrt/faf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abrt/faf/downloads","issues_url":"https://api.github.com/repos/abrt/faf/issues{/number}","pulls_url":"https://api.github.com/repos/abrt/faf/pulls{/number}","milestones_url":"https://api.github.com/repos/abrt/faf/milestones{/number}","notifications_url":"https://api.github.com/repos/abrt/faf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abrt/faf/labels{/name}","releases_url":"https://api.github.com/repos/abrt/faf/releases{/id}","created_at":"2013-02-01T14:45:12Z","updated_at":"2014-06-30T06:56:45Z","pushed_at":"2014-08-05T14:03:49Z","git_url":"git://github.com/abrt/faf.git","ssh_url":"git@github.com:abrt/faf.git","clone_url":"https://github.com/abrt/faf.git","svn_url":"https://github.com/abrt/faf","homepage":null,"size":9292,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":70,"forks":2,"open_issues":70,"watchers":5,"default_branch":"master"}},"base":{"label":"abrt:master","ref":"master","sha":"316786bb02b7328a218877dc12e1734a9b14470d","user":{"login":"abrt","id":3449403,"avatar_url":"https://avatars.githubusercontent.com/u/3449403?v=2","gravatar_id":"78df71f39188ec2407d3aaa48173d106","url":"https://api.github.com/users/abrt","html_url":"https://github.com/abrt","followers_url":"https://api.github.com/users/abrt/followers","following_url":"https://api.github.com/users/abrt/following{/other_user}","gists_url":"https://api.github.com/users/abrt/gists{/gist_id}","starred_url":"https://api.github.com/users/abrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abrt/subscriptions","organizations_url":"https://api.github.com/users/abrt/orgs","repos_url":"https://api.github.com/users/abrt/repos","events_url":"https://api.github.com/users/abrt/events{/privacy}","received_events_url":"https://api.github.com/users/abrt/received_events","type":"Organization","site_admin":false},"repo":{"id":7959759,"name":"faf","full_name":"abrt/faf","owner":{"login":"abrt","id":3449403,"avatar_url":"https://avatars.githubusercontent.com/u/3449403?v=2","gravatar_id":"78df71f39188ec2407d3aaa48173d106","url":"https://api.github.com/users/abrt","html_url":"https://github.com/abrt","followers_url":"https://api.github.com/users/abrt/followers","following_url":"https://api.github.com/users/abrt/following{/other_user}","gists_url":"https://api.github.com/users/abrt/gists{/gist_id}","starred_url":"https://api.github.com/users/abrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abrt/subscriptions","organizations_url":"https://api.github.com/users/abrt/orgs","repos_url":"https://api.github.com/users/abrt/repos","events_url":"https://api.github.com/users/abrt/events{/privacy}","received_events_url":"https://api.github.com/users/abrt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/abrt/faf","description":"Platform for collection and analysis of packages and package crashes","fork":false,"url":"https://api.github.com/repos/abrt/faf","forks_url":"https://api.github.com/repos/abrt/faf/forks","keys_url":"https://api.github.com/repos/abrt/faf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abrt/faf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abrt/faf/teams","hooks_url":"https://api.github.com/repos/abrt/faf/hooks","issue_events_url":"https://api.github.com/repos/abrt/faf/issues/events{/number}","events_url":"https://api.github.com/repos/abrt/faf/events","assignees_url":"https://api.github.com/repos/abrt/faf/assignees{/user}","branches_url":"https://api.github.com/repos/abrt/faf/branches{/branch}","tags_url":"https://api.github.com/repos/abrt/faf/tags","blobs_url":"https://api.github.com/repos/abrt/faf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abrt/faf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abrt/faf/git/refs{/sha}","trees_url":"https://api.github.com/repos/abrt/faf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abrt/faf/statuses/{sha}","languages_url":"https://api.github.com/repos/abrt/faf/languages","stargazers_url":"https://api.github.com/repos/abrt/faf/stargazers","contributors_url":"https://api.github.com/repos/abrt/faf/contributors","subscribers_url":"https://api.github.com/repos/abrt/faf/subscribers","subscription_url":"https://api.github.com/repos/abrt/faf/subscription","commits_url":"https://api.github.com/repos/abrt/faf/commits{/sha}","git_commits_url":"https://api.github.com/repos/abrt/faf/git/commits{/sha}","comments_url":"https://api.github.com/repos/abrt/faf/comments{/number}","issue_comment_url":"https://api.github.com/repos/abrt/faf/issues/comments/{number}","contents_url":"https://api.github.com/repos/abrt/faf/contents/{+path}","compare_url":"https://api.github.com/repos/abrt/faf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abrt/faf/merges","archive_url":"https://api.github.com/repos/abrt/faf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abrt/faf/downloads","issues_url":"https://api.github.com/repos/abrt/faf/issues{/number}","pulls_url":"https://api.github.com/repos/abrt/faf/pulls{/number}","milestones_url":"https://api.github.com/repos/abrt/faf/milestones{/number}","notifications_url":"https://api.github.com/repos/abrt/faf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abrt/faf/labels{/name}","releases_url":"https://api.github.com/repos/abrt/faf/releases{/id}","created_at":"2013-02-01T14:45:12Z","updated_at":"2014-06-30T06:56:45Z","pushed_at":"2014-08-05T14:03:49Z","git_url":"git://github.com/abrt/faf.git","ssh_url":"git@github.com:abrt/faf.git","clone_url":"https://github.com/abrt/faf.git","svn_url":"https://github.com/abrt/faf","homepage":null,"size":9292,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":70,"forks":2,"open_issues":70,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abrt/faf/pulls/253"},"html":{"href":"https://github.com/abrt/faf/pull/253"},"issue":{"href":"https://api.github.com/repos/abrt/faf/issues/253"},"comments":{"href":"https://api.github.com/repos/abrt/faf/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/abrt/faf/pulls/253/comments"},"review_comment":{"href":"https://api.github.com/repos/abrt/faf/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/abrt/faf/pulls/253/commits"},"statuses":{"href":"https://api.github.com/repos/abrt/faf/statuses/c275737703081c2a399723e7c9f7d6006453a7cd"}}}}