{"action":"created","comment":{"url":"https://api.github.com/repos/translate/pootle/pulls/comments/36723228","id":36723228,"diff_hunk":"@@ -0,0 +1,62 @@\n+#!/usr/bin/env python\n+# -*- coding: utf-8 -*-\n+#\n+# Copyright (C) Pootle contributors.\n+#\n+# This file is a part of the Pootle project. It is distributed under the GPL3\n+# or later license. See the LICENSE file for a copy of the license and the\n+# AUTHORS file for copyright and authorship information.\n+\n+import os\n+os.environ['DJANGO_SETTINGS_MODULE'] = 'pootle.settings'\n+\n+from collections import Counter\n+from optparse import make_option\n+from django.contrib.auth import get_user_model\n+from pootle_app.management.commands import PootleCommand\n+from pootle_store.models import Unit\n+\n+\n+User = get_user_model()\n+\n+\n+class Command(PootleCommand):\n+    option_list = PootleCommand.option_list + (\n+        make_option(\"--from-revision\", type=int, default=0, dest=\"revision\",\n+                    help=\"Only count contributions newer than this revision\"),\n+    )\n+\n+    help = \"Print a list of contributors.\"\n+\n+    def handle_all(self, **options):\n+        units = Unit.objects.values(\"submitted_by\").exclude(submitted_by=None)","path":"pootle/apps/pootle_app/management/commands/contributors.py","position":32,"original_position":32,"commit_id":"cbb543d8fa4715788af042b6f746aac5db4b9b10","original_commit_id":"cbb543d8fa4715788af042b6f746aac5db4b9b10","user":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"body":"Yes, it's cheap and more reliable.","created_at":"2015-08-11T08:44:52Z","updated_at":"2015-08-11T08:44:52Z","html_url":"https://github.com/translate/pootle/pull/3958#discussion_r36723228","pull_request_url":"https://api.github.com/repos/translate/pootle/pulls/3958","_links":{"self":{"href":"https://api.github.com/repos/translate/pootle/pulls/comments/36723228"},"html":{"href":"https://github.com/translate/pootle/pull/3958#discussion_r36723228"},"pull_request":{"href":"https://api.github.com/repos/translate/pootle/pulls/3958"}}},"pull_request":{"url":"https://api.github.com/repos/translate/pootle/pulls/3958","id":42102653,"html_url":"https://github.com/translate/pootle/pull/3958","diff_url":"https://github.com/translate/pootle/pull/3958.diff","patch_url":"https://github.com/translate/pootle/pull/3958.patch","issue_url":"https://api.github.com/repos/translate/pootle/issues/3958","number":3958,"state":"open","locked":false,"title":"Add manage.py contributors","user":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"body":"#3867","created_at":"2015-08-11T08:08:40Z","updated_at":"2015-08-11T08:44:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cb08e8ab905f775d3cc0299290557afbdb967e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/translate/pootle/pulls/3958/commits","review_comments_url":"https://api.github.com/repos/translate/pootle/pulls/3958/comments","review_comment_url":"https://api.github.com/repos/translate/pootle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/translate/pootle/issues/3958/comments","statuses_url":"https://api.github.com/repos/translate/pootle/statuses/cbb543d8fa4715788af042b6f746aac5db4b9b10","head":{"label":"jleclanche:master","ref":"master","sha":"cbb543d8fa4715788af042b6f746aac5db4b9b10","user":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"repo":{"id":16691004,"name":"pootle","full_name":"jleclanche/pootle","owner":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jleclanche/pootle","description":"Online translation tool","fork":true,"url":"https://api.github.com/repos/jleclanche/pootle","forks_url":"https://api.github.com/repos/jleclanche/pootle/forks","keys_url":"https://api.github.com/repos/jleclanche/pootle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jleclanche/pootle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jleclanche/pootle/teams","hooks_url":"https://api.github.com/repos/jleclanche/pootle/hooks","issue_events_url":"https://api.github.com/repos/jleclanche/pootle/issues/events{/number}","events_url":"https://api.github.com/repos/jleclanche/pootle/events","assignees_url":"https://api.github.com/repos/jleclanche/pootle/assignees{/user}","branches_url":"https://api.github.com/repos/jleclanche/pootle/branches{/branch}","tags_url":"https://api.github.com/repos/jleclanche/pootle/tags","blobs_url":"https://api.github.com/repos/jleclanche/pootle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jleclanche/pootle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jleclanche/pootle/git/refs{/sha}","trees_url":"https://api.github.com/repos/jleclanche/pootle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jleclanche/pootle/statuses/{sha}","languages_url":"https://api.github.com/repos/jleclanche/pootle/languages","stargazers_url":"https://api.github.com/repos/jleclanche/pootle/stargazers","contributors_url":"https://api.github.com/repos/jleclanche/pootle/contributors","subscribers_url":"https://api.github.com/repos/jleclanche/pootle/subscribers","subscription_url":"https://api.github.com/repos/jleclanche/pootle/subscription","commits_url":"https://api.github.com/repos/jleclanche/pootle/commits{/sha}","git_commits_url":"https://api.github.com/repos/jleclanche/pootle/git/commits{/sha}","comments_url":"https://api.github.com/repos/jleclanche/pootle/comments{/number}","issue_comment_url":"https://api.github.com/repos/jleclanche/pootle/issues/comments{/number}","contents_url":"https://api.github.com/repos/jleclanche/pootle/contents/{+path}","compare_url":"https://api.github.com/repos/jleclanche/pootle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jleclanche/pootle/merges","archive_url":"https://api.github.com/repos/jleclanche/pootle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jleclanche/pootle/downloads","issues_url":"https://api.github.com/repos/jleclanche/pootle/issues{/number}","pulls_url":"https://api.github.com/repos/jleclanche/pootle/pulls{/number}","milestones_url":"https://api.github.com/repos/jleclanche/pootle/milestones{/number}","notifications_url":"https://api.github.com/repos/jleclanche/pootle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jleclanche/pootle/labels{/name}","releases_url":"https://api.github.com/repos/jleclanche/pootle/releases{/id}","created_at":"2014-02-10T09:47:26Z","updated_at":"2015-05-07T08:57:18Z","pushed_at":"2015-08-11T08:37:39Z","git_url":"git://github.com/jleclanche/pootle.git","ssh_url":"git@github.com:jleclanche/pootle.git","clone_url":"https://github.com/jleclanche/pootle.git","svn_url":"https://github.com/jleclanche/pootle","homepage":"http://pootle.translatehouse.org","size":73029,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"translate:master","ref":"master","sha":"3e7b14db1a05822d20a984c249262f3fb73ef588","user":{"login":"translate","id":1538178,"avatar_url":"https://avatars.githubusercontent.com/u/1538178?v=3","gravatar_id":"","url":"https://api.github.com/users/translate","html_url":"https://github.com/translate","followers_url":"https://api.github.com/users/translate/followers","following_url":"https://api.github.com/users/translate/following{/other_user}","gists_url":"https://api.github.com/users/translate/gists{/gist_id}","starred_url":"https://api.github.com/users/translate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/translate/subscriptions","organizations_url":"https://api.github.com/users/translate/orgs","repos_url":"https://api.github.com/users/translate/repos","events_url":"https://api.github.com/users/translate/events{/privacy}","received_events_url":"https://api.github.com/users/translate/received_events","type":"Organization","site_admin":false},"repo":{"id":3769702,"name":"pootle","full_name":"translate/pootle","owner":{"login":"translate","id":1538178,"avatar_url":"https://avatars.githubusercontent.com/u/1538178?v=3","gravatar_id":"","url":"https://api.github.com/users/translate","html_url":"https://github.com/translate","followers_url":"https://api.github.com/users/translate/followers","following_url":"https://api.github.com/users/translate/following{/other_user}","gists_url":"https://api.github.com/users/translate/gists{/gist_id}","starred_url":"https://api.github.com/users/translate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/translate/subscriptions","organizations_url":"https://api.github.com/users/translate/orgs","repos_url":"https://api.github.com/users/translate/repos","events_url":"https://api.github.com/users/translate/events{/privacy}","received_events_url":"https://api.github.com/users/translate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/translate/pootle","description":"Online translation tool","fork":false,"url":"https://api.github.com/repos/translate/pootle","forks_url":"https://api.github.com/repos/translate/pootle/forks","keys_url":"https://api.github.com/repos/translate/pootle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/translate/pootle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/translate/pootle/teams","hooks_url":"https://api.github.com/repos/translate/pootle/hooks","issue_events_url":"https://api.github.com/repos/translate/pootle/issues/events{/number}","events_url":"https://api.github.com/repos/translate/pootle/events","assignees_url":"https://api.github.com/repos/translate/pootle/assignees{/user}","branches_url":"https://api.github.com/repos/translate/pootle/branches{/branch}","tags_url":"https://api.github.com/repos/translate/pootle/tags","blobs_url":"https://api.github.com/repos/translate/pootle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/translate/pootle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/translate/pootle/git/refs{/sha}","trees_url":"https://api.github.com/repos/translate/pootle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/translate/pootle/statuses/{sha}","languages_url":"https://api.github.com/repos/translate/pootle/languages","stargazers_url":"https://api.github.com/repos/translate/pootle/stargazers","contributors_url":"https://api.github.com/repos/translate/pootle/contributors","subscribers_url":"https://api.github.com/repos/translate/pootle/subscribers","subscription_url":"https://api.github.com/repos/translate/pootle/subscription","commits_url":"https://api.github.com/repos/translate/pootle/commits{/sha}","git_commits_url":"https://api.github.com/repos/translate/pootle/git/commits{/sha}","comments_url":"https://api.github.com/repos/translate/pootle/comments{/number}","issue_comment_url":"https://api.github.com/repos/translate/pootle/issues/comments{/number}","contents_url":"https://api.github.com/repos/translate/pootle/contents/{+path}","compare_url":"https://api.github.com/repos/translate/pootle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/translate/pootle/merges","archive_url":"https://api.github.com/repos/translate/pootle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/translate/pootle/downloads","issues_url":"https://api.github.com/repos/translate/pootle/issues{/number}","pulls_url":"https://api.github.com/repos/translate/pootle/pulls{/number}","milestones_url":"https://api.github.com/repos/translate/pootle/milestones{/number}","notifications_url":"https://api.github.com/repos/translate/pootle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/translate/pootle/labels{/name}","releases_url":"https://api.github.com/repos/translate/pootle/releases{/id}","created_at":"2012-03-19T23:06:03Z","updated_at":"2015-08-09T20:19:22Z","pushed_at":"2015-08-11T08:37:39Z","git_url":"git://github.com/translate/pootle.git","ssh_url":"git@github.com:translate/pootle.git","clone_url":"https://github.com/translate/pootle.git","svn_url":"https://github.com/translate/pootle","homepage":"http://pootle.translatehouse.org","size":82669,"stargazers_count":497,"watchers_count":497,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":153,"mirror_url":null,"open_issues_count":247,"forks":153,"open_issues":247,"watchers":497,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/translate/pootle/pulls/3958"},"html":{"href":"https://github.com/translate/pootle/pull/3958"},"issue":{"href":"https://api.github.com/repos/translate/pootle/issues/3958"},"comments":{"href":"https://api.github.com/repos/translate/pootle/issues/3958/comments"},"review_comments":{"href":"https://api.github.com/repos/translate/pootle/pulls/3958/comments"},"review_comment":{"href":"https://api.github.com/repos/translate/pootle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/translate/pootle/pulls/3958/commits"},"statuses":{"href":"https://api.github.com/repos/translate/pootle/statuses/cbb543d8fa4715788af042b6f746aac5db4b9b10"}}}}