From metatracker at psf.upfronthosting.co.za Sat Apr 1 14:47:09 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sat, 01 Apr 2017 18:47:09 +0000 Subject: [Tracker-discuss] [issue624] bpo emails contain useless non-github pull_request number - users want a link to actual github PR In-Reply-To: <1490979933.98.0.318344152862.issue624@psf.upfronthosting.co.za> Message-ID: <1491072429.22.0.340120458748.issue624@psf.upfronthosting.co.za> Ezio Melotti added the comment: I've been looking at the code and perhaps it can be done in detectors/sendmail.py. I'll try to put together a patch sometimes next week. ---------- assignedto: -> ezio.melotti _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Apr 1 15:00:21 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sat, 01 Apr 2017 19:00:21 +0000 Subject: [Tracker-discuss] [issue624] bpo emails contain useless non-github pull_request number - users want a link to actual github PR In-Reply-To: <1490979933.98.0.318344152862.issue624@psf.upfronthosting.co.za> Message-ID: <1491073221.8.0.269642502213.issue624@psf.upfronthosting.co.za> Ezio Melotti added the comment: (FWIW I've been also considering having a 1:1 match between PR numbers and internal roundup ids for pull_requests, however this requires two step: 1) make sure that only one Roundup pull_request exists for each GitHub PR; 2) make sure that the PR numbers and Roundup ids match; I'd like to see point 1 implemented regardless. I first suggested it during review but since it was not trivial to do we decided to postpone it as not to block the GitHub migration any further. I'm not sure if point 2 can be implemented since the ids are auto-incremented and as far as I know they can't be changed.) _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Apr 4 16:07:46 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Tue, 04 Apr 2017 20:07:46 +0000 Subject: [Tracker-discuss] [issue625] Limit the number of bpo issues linked to a PR Message-ID: <1491336466.72.0.980350670975.issue625@psf.upfronthosting.co.za> New submission from Ezio Melotti: If a PR links to several bpo issues, we should avoid adding the PR to all of them, but rather limit the linking to the first 5-10 bpo issues. Attached a WIP patch with tests and a possible fix. ---------- files: limitlink.diffs messages: 3331 nosy: ezio.melotti priority: bug status: unread title: Limit the number of bpo issues linked to a PR _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: limitlink.diffs Type: application/octet-stream Size: 21791 bytes Desc: not available URL: From metatracker at psf.upfronthosting.co.za Tue Apr 4 16:56:59 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Tue, 04 Apr 2017 20:56:59 +0000 Subject: [Tracker-discuss] [issue625] Limit the number of bpo issues linked to a PR In-Reply-To: <1491336466.72.0.980350670975.issue625@psf.upfronthosting.co.za> Message-ID: <1491339419.13.0.641276542076.issue625@psf.upfronthosting.co.za> Maciej Szulik added the comment: Updated version with issue comment handled, as well. ---------- nosy: +maciej.szulik status: unread -> in-progress _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/roundup/github.py b/roundup/github.py --- a/roundup/github.py +++ b/roundup/github.py @@ -20,6 +20,8 @@ ISSUE_RE = re.compile(r'%sbpo-(?P\d+)' % VERBS, re.I|re.U) BRANCH_RE = re.compile(r'(2\.\d|3\.\d|master)', re.I) +ISSUE_LIMIT = 10 + COMMENT_TEMPLATE = u"""\ New changeset {changeset_id} by {author} in branch '{branch}': {commit_msg} @@ -170,6 +172,10 @@ issue_ids = list(self.db.issue.create( title=title.encode('utf-8'))) prid, title, status = self.get_pr_details() + # limit to max 10 issues + if len(issue_ids) > ISSUE_LIMIT: + logging.info("Limiting links for %s: %s", prid, issue_ids) + issue_ids = issue_ids[:ISSUE_LIMIT] self.handle_action(action, prid, title, status, issue_ids) def handle_create(self, prid, title, status, issue_ids): @@ -220,6 +226,16 @@ else: self.handle_create(prid, title, status, [issue_id]) + def unique_ordered(self, issue_ids): + """ + Helper method returning unique and ordered (how they appear) issue_ids. + """ + ids = [] + for id in issue_ids: + if id not in ids: + ids.append(id) + return ids + def handle_action(self, action, prid, title, status, issue_ids): raise NotImplementedError @@ -258,7 +274,7 @@ body = pull_request.get('body', '') or '' # body can be None title_ids = [x[1] for x in ISSUE_RE.findall(title)] body_ids = [x[1] for x in ISSUE_RE.findall(body)] - return list(set(title_ids + body_ids)) + return self.unique_ordered(title_ids + body_ids) def get_pr_details(self): """ @@ -315,7 +331,7 @@ body = comment.get('body', '') title_ids = [x[1] for x in ISSUE_RE.findall(title)] body_ids = [x[1] for x in ISSUE_RE.findall(body)] - return list(set(title_ids + body_ids)) + return self.unique_ordered(title_ids + body_ids) def get_pr_details(self): """ diff --git a/test/data/issuecommentevent1.txt b/test/data/issuecommentevent1.txt new file mode 100644 --- /dev/null +++ b/test/data/issuecommentevent1.txt @@ -0,0 +1,11 @@ +POST /python-dev/pull_request HTTP/1.1 +Host: 2f3784dc.ngrok.io +Accept: */* +User-Agent: GitHub-Hookshot/9667e0c +X-GitHub-Event: issue_comment +X-GitHub-Delivery: c6d12700-270e-11e6-86c5-8e9c9c898175 +content-type: application/json +X-Hub-Signature: sha1=aee43a9a43bb58292f782a27cad0396f890226e3 +Content-Length: 8525 + +{"action":"created","issue":{"url":"https://api.github.com/repos/python/cpython/issues/1","repository_url":"https://api.github.com/repos/python/cpython","labels_url":"https://api.github.com/repos/python/cpython/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/python/cpython/issues/1/comments","events_url":"https://api.github.com/repos/python/cpython/issues/1/events","html_url":"https://github.com/python/cpython/pull/1","id":156471938,"number":1,"title":"bpo-1","user":{"login":"AnishShah","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/AnishShah","html_url":"https://github.com/AnishShah","followers_url":"https://api.github.com/users/AnishShah/followers","following_url":"https://api.github.com/users/AnishShah/following{/other_user}","gists_url":"https://api.github.com/users/AnishShah/gists{/gist_id}","starred_url":"https://api.github.com/users/AnishShah/starred{/owner}{/rep o}","subscriptions_url":"https://api.github.com/users/AnishShah/subscriptions","organizations_url":"https://api.github.com/users/AnishShah/orgs","repos_url":"https://api.github.com/users/AnishShah/repos","events_url":"https://api.github.com/users/AnishShah/events{/privacy}","received_events_url":"https://api.github.com/users/AnishShah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-24T10:22:11Z","updated_at":"2016-05-31T09:05:10Z","closed_at":"2016-05-24T10:23:56Z","pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/1","html_url":"https://github.com/python/cpython/pull/1","diff_url":"https://github.com/python/cpython/pull/1.diff","patch_url":"https://github.com/python/cpython/pull/1.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/python/cpython/issues/comments/222632341","html_url":"https://github.com/python/cpython/pull/1# issuecomment-222632341","issue_url":"https://api.github.com/repos/python/cpython/issues/1","id":222632341,"user":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/AnishShah","html_url":"https://github.com/AnishShah","followers_url":"https://api.github.com/users/AnishShah/followers","following_url":"https://api.github.com/users/AnishShah/following{/other_user}","gists_url":"https://api.github.com/users/AnishShah/gists{/gist_id}","starred_url":"https://api.github.com/users/AnishShah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnishShah/subscriptions","organizations_url":"https://api.github.com/users/AnishShah/orgs","repos_url":"https://api.github.com/users/AnishShah/repos","events_url":"https://api.github.com/users/AnishShah/events{/privacy}","received_events_url":"https://api.github.com/users/AnishShah/received_events","type":"User","site_admin":f alse},"created_at":"2016-05-31T09:05:10Z","updated_at":"2016-05-31T09:05:10Z","body":"bpo-1 bpo-2 bpo-3 bpo-4 bpo-5 bpo-6 bpo-7 bpo-8 bpo-9 bpo-10 bpo-11 bpo-12 bpo-13 bpo-14 bpo-15 bpo-16 bpo-17 bpo-18 bpo-19 bpo-20"},"repository":{"id":59477756,"name":"cpython","full_name":"python/cpython","owner":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"htt ps://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"Semi-official read-only mirror of the CPython Mercurial repository","fork":true,"url":"https://api.github.com/repos/python/cpython","forks_url":"https://api.github.com/repos/python/cpython/forks","keys_url":"https://api.github.com/repos/python/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/cpython/teams","hooks_url":"https://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/python/cpython/events","assignees_url":"https://api.github.com/repos/python/cpython/assignees{/user}","branches_url":"https://api .github.com/repos/python/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/python/cpython/tags","blobs_url":"https://api.github.com/repos/python/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/python/cpython/languages","stargazers_url":"https://api.github.com/repos/python/cpython/stargazers","contributors_url":"https://api.github.com/repos/python/cpython/contributors","subscribers_url":"https://api.github.com/repos/python/cpython/subscribers","subscription_url":"https://api.github.com/repos/python/cpython/subscription","commits_url":"https://api.github.com/repos/python/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos /python/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/python/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/cpython/merges","archive_url":"https://api.github.com/repos/python/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/cpython/downloads","issues_url":"https://api.github.com/repos/python/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/python/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/python/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/python/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/cpython/labels {/name}","releases_url":"https://api.github.com/repos/python/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/python/cpython/deployments","created_at":"2016-05-23T11:39:11Z","updated_at":"2016-05-23T11:39:38Z","pushed_at":"2016-05-24T13:18:37Z","git_url":"git://github.com/python/cpython.git","ssh_url":"git at github.com:python/cpython.git","clone_url":"https://github.com/python/cpython.git","svn_url":"https://github.com/python/cpython","homepage":"","size":276521,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"},"sender":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.co m/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false}} diff --git a/test/data/pullrequestevent9.txt b/test/data/pullrequestevent9.txt new file mode 100644 --- /dev/null +++ b/test/data/pullrequestevent9.txt @@ -0,0 +1,11 @@ +POST /python-dev/pull_request HTTP/1.1 +Host: 3ab1787e.ngrok.io +Accept: */* +User-Agent: GitHub-Hookshot/98ea3cc +X-GitHub-Event: pull_request +X-GitHub-Delivery: 3d4b5180-5c89-11e6-88fd-1aa99d941991 +content-type: application/json +X-Hub-Signature: sha1=2917f3cff6684faaacc584467999caa91ece6331 +Content-Length: 19113 + +{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/11","id":80363608,"html_url":"https://github.com/python/cpython/pull/11","diff_url":"https://github.com/python/cpython/pull/11.diff","patch_url":"https://github.com/python/cpython/pull/11.patch","issue_url":"https://api.github.com/repos/python/cpython/issues/11","number":11,"state":"open","locked":false,"title":"fixes bpo-1","user":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions" ,"organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false},"body":"bpo-1 bpo-2 bpo-3 bpo-4 bpo-5 bpo-6 bpo-7 bpo-8 bpo-9 bpo-10 bpo-11 bpo-12 bpo-13 bpo-14 bpo-15 bpo-16 bpo-17 bpo-18 bpo-19 bpo-20","created_at":"2016-08-07T10:25:19Z","updated_at":"2016-08-07T10:25:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python/cpython/pulls/11/commits","review_comments_url":"https://api.github.com/repos/python/cpython/pulls/11/comments","review_comment_url":"https://api.github.com/repos/python/cpython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/cpython/issues/11/comments","statuses_url":"https://api.github.com/ repos/python/cpython/statuses/170f8a1f0ffbb733de656cd4a332ecea0c526d53","head":{"label":"python:master","ref":"master","sha":"170f8a1f0ffbb733de656cd4a332ecea0c526d53","user":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events" ,"type":"User","site_admin":false},"repo":{"id":59477756,"name":"cpython","full_name":"python/cpython","owner":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false},"private":false,"html_url":"h ttps://github.com/python/cpython","description":"Semi-official read-only mirror of the CPython Mercurial repository","fork":true,"url":"https://api.github.com/repos/python/cpython","forks_url":"https://api.github.com/repos/python/cpython/forks","keys_url":"https://api.github.com/repos/python/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/cpython/teams","hooks_url":"https://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/python/cpython/events","assignees_url":"https://api.github.com/repos/python/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/python/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/python/cpython/tags","blobs_url":"https://api.github.com/repos/python/cpython/git/blobs{/sha}","g it_tags_url":"https://api.github.com/repos/python/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/python/cpython/languages","stargazers_url":"https://api.github.com/repos/python/cpython/stargazers","contributors_url":"https://api.github.com/repos/python/cpython/contributors","subscribers_url":"https://api.github.com/repos/python/cpython/subscribers","subscription_url":"https://api.github.com/repos/python/cpython/subscription","commits_url":"https://api.github.com/repos/python/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/cpython/issues/comm ents{/number}","contents_url":"https://api.github.com/repos/python/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/python/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/cpython/merges","archive_url":"https://api.github.com/repos/python/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/cpython/downloads","issues_url":"https://api.github.com/repos/python/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/python/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/python/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/python/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/cpython/labels{/name}","releases_url":"https://api.github.com/repos/python/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/python/cpython/deployments","created_at":"2016-05-23T11:39 :11Z","updated_at":"2016-05-23T11:39:38Z","pushed_at":"2016-08-07T10:25:19Z","git_url":"git://github.com/python/cpython.git","ssh_url":"git at github.com:python/cpython.git","clone_url":"https://github.com/python/cpython.git","svn_url":"https://github.com/python/cpython","homepage":"","size":205407,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"python:revert-1-test","ref":"revert-1-test","sha":"886390c8473a1d52e07d20fd97176a56c153b9a1","user":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/fo llowing{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false},"repo":{"id":59477756,"name":"cpython","full_name":"python/cpython","owner":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/ python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"Semi-official read-only mirror of the CPython Mercurial repository","fork":true,"url":"https://api.github.com/repos/python/cpython","forks_url":"https://api.github.com/repos/python/cpython/forks","keys_url":"https://api.github.com/repos/python/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/cpython/teams","hooks_url":"http s://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/python/cpython/events","assignees_url":"https://api.github.com/repos/python/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/python/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/python/cpython/tags","blobs_url":"https://api.github.com/repos/python/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/python/cpython/languages","stargazers_url":"https://api.github.com/repos/python/cpython/stargazers","contributors_url":"https://api.github.com/rep os/python/cpython/contributors","subscribers_url":"https://api.github.com/repos/python/cpython/subscribers","subscription_url":"https://api.github.com/repos/python/cpython/subscription","commits_url":"https://api.github.com/repos/python/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/python/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/cpython/merges","archive_url":"https://api.github.com/repos/python/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/cpython/downloads","issues_url":"https://api.github.com/repos/python/cpython/issues{/number}","pulls_url":"https: //api.github.com/repos/python/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/python/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/python/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/cpython/labels{/name}","releases_url":"https://api.github.com/repos/python/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/python/cpython/deployments","created_at":"2016-05-23T11:39:11Z","updated_at":"2016-05-23T11:39:38Z","pushed_at":"2016-08-07T10:25:19Z","git_url":"git://github.com/python/cpython.git","ssh_url":"git at github.com:python/cpython.git","clone_url":"https://github.com/python/cpython.git","svn_url":"https://github.com/python/cpython","homepage":"","size":205407,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"for ks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/cpython/pulls/11"},"html":{"href":"https://github.com/python/cpython/pull/11"},"issue":{"href":"https://api.github.com/repos/python/cpython/issues/11"},"comments":{"href":"https://api.github.com/repos/python/cpython/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/python/cpython/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/python/cpython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/cpython/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/python/cpython/statuses/170f8a1f0ffbb733de656cd4a332ecea0c526d53"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":1},"repository":{"id":59477756,"name":"cpython","full_name":"python/cpython ","owner":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"Semi-official read-only mirror of the CPython Mercur ial repository","fork":true,"url":"https://api.github.com/repos/python/cpython","forks_url":"https://api.github.com/repos/python/cpython/forks","keys_url":"https://api.github.com/repos/python/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/cpython/teams","hooks_url":"https://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/python/cpython/events","assignees_url":"https://api.github.com/repos/python/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/python/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/python/cpython/tags","blobs_url":"https://api.github.com/repos/python/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/cpython/git/tags{/sha}","git_refs_url":"https://api .github.com/repos/python/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/python/cpython/languages","stargazers_url":"https://api.github.com/repos/python/cpython/stargazers","contributors_url":"https://api.github.com/repos/python/cpython/contributors","subscribers_url":"https://api.github.com/repos/python/cpython/subscribers","subscription_url":"https://api.github.com/repos/python/cpython/subscription","commits_url":"https://api.github.com/repos/python/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/cpython/contents/{+path}","compare _url":"https://api.github.com/repos/python/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/cpython/merges","archive_url":"https://api.github.com/repos/python/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/cpython/downloads","issues_url":"https://api.github.com/repos/python/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/python/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/python/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/python/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/cpython/labels{/name}","releases_url":"https://api.github.com/repos/python/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/python/cpython/deployments","created_at":"2016-05-23T11:39:11Z","updated_at":"2016-05-23T11:39:38Z","pushed_at":"2016-08-07T10:25:19Z","git_url":"git://github. com/python/cpython.git","ssh_url":"git at github.com:python/cpython.git","clone_url":"https://github.com/python/cpython.git","svn_url":"https://github.com/python/cpython","homepage":"","size":205407,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"},"sender":{"login":"python","id":3175743,"avatar_url":"https://avatars.githubusercontent.com/u/3175743?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/use rs/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"User","site_admin":false}} diff --git a/test/test_github.py b/test/test_github.py --- a/test/test_github.py +++ b/test/test_github.py @@ -112,6 +112,22 @@ user_id = self.db.pull_request.get(prs[0], 'creator') self.assertEqual(self.db.user.get(user_id, 'github'), 'AnishShah') + def testIssueCommentEventWithLotsOfReferencedIssues(self): + # Check that the number of references gets limited + dummy_client = self._make_client("issuecommentevent1.txt") + for n in range(2, 21): + self.db.issue.create(title="Issue %d" % n) + handler = GitHubHandler(dummy_client) + handler.dispatch() + for i in range(1, 11): + prs = self.db.issue.get(str(i), 'pull_requests') + self.assertEqual(len(prs), 1, str(i)) + number = self.db.pull_request.get(prs[0], 'number') + self.assertEqual(number, '1') + for i in range(11, 21): + prs = self.db.issue.get(str(i), 'pull_requests') + self.assertEqual(len(prs), 0, str(i)) + def testPullRequestCommentEvent(self): dummy_client = self._make_client("pullrequestcommentevent.txt") handler = GitHubHandler(dummy_client) @@ -255,6 +271,22 @@ title = self.db.pull_request.get(prs[0], 'title') self.assertEqual(title, 'bpo-1 bpo-2 bpo-3') + def testPullRequestEventWithLotsOfReferencedIssues(self): + # Check that the number of references gets limited + dummy_client = self._make_client("pullrequestevent9.txt") + for n in range(2, 21): + self.db.issue.create(title="Issue %d" % n) + handler = GitHubHandler(dummy_client) + handler.dispatch() + for i in range(1, 11): + prs = self.db.issue.get(str(i), 'pull_requests') + self.assertEqual(len(prs), 1, str(i)) + number = self.db.pull_request.get(prs[0], 'number') + self.assertEqual(number, '11') + for i in range(11, 21): + prs = self.db.issue.get(str(i), 'pull_requests') + self.assertEqual(len(prs), 0, str(i)) + def testPullRequestEventWithoutIssueReference(self): # When no issue is referenced in PR and environment variable is set dummy_client = self._make_client("pullrequestevent2.txt") From metatracker at psf.upfronthosting.co.za Tue Apr 4 17:08:11 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Tue, 04 Apr 2017 21:08:11 +0000 Subject: [Tracker-discuss] [issue625] Limit the number of bpo issues linked to a PR In-Reply-To: <1491336466.72.0.980350670975.issue625@psf.upfronthosting.co.za> Message-ID: <1491340091.21.0.619385415133.issue625@psf.upfronthosting.co.za> Maciej Szulik added the comment: Initial patch from Ezio with my addons applied in https://hg.python.org/tracker/roundup/rev/51efd8e5b8a8 ---------- status: in-progress -> testing _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Apr 4 17:15:03 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Tue, 04 Apr 2017 21:15:03 +0000 Subject: [Tracker-discuss] [issue625] Limit the number of bpo issues linked to a PR In-Reply-To: <1491336466.72.0.980350670975.issue625@psf.upfronthosting.co.za> Message-ID: <1491340502.99.0.311949528116.issue625@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch is now live, closing. ---------- status: testing -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Apr 4 17:33:53 2017 From: metatracker at psf.upfronthosting.co.za (R David Murray) Date: Tue, 04 Apr 2017 21:33:53 +0000 Subject: [Tracker-discuss] [issue625] Limit the number of bpo issues linked to a PR In-Reply-To: <1491340502.99.0.311949528116.issue625@psf.upfronthosting.co.za> Message-ID: <20170404213350.295A91310018@webabinitio.net> R David Murray added the comment: I would think that a PR should only ever apply to one issue (the others should be closed or made dependencies), so I think this should be limited to linking to the first issue mentioned --David ---------- nosy: +r.david.murray _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Apr 5 03:50:46 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Wed, 05 Apr 2017 07:50:46 +0000 Subject: [Tracker-discuss] [issue625] Limit the number of bpo issues linked to a PR In-Reply-To: <1491336466.72.0.980350670975.issue625@psf.upfronthosting.co.za> Message-ID: <1491378646.04.0.86001572635.issue625@psf.upfronthosting.co.za> Maciej Szulik added the comment: I've personally used multiple issues under single PR (not for python, but in general), but that was never than 2 or 3. So completely disabling, or rather limiting to 1 is not a good solution. Lowering the limit by half, from 10 to 5, seems ok to me. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Apr 13 10:20:07 2017 From: metatracker at psf.upfronthosting.co.za (Mariatta) Date: Thu, 13 Apr 2017 14:20:07 +0000 Subject: [Tracker-discuss] [issue463] HTTPS only version for login for this tracker In-Reply-To: <1337666026.16.0.0159243982051.issue463@psf.upfronthosting.co.za> Message-ID: <1492093207.89.0.286306988605.issue463@psf.upfronthosting.co.za> Mariatta added the comment: What do we need to move this forward? I would like the bug tracker to always be in https. ---------- nosy: +Mariatta _______________________________________________________ PSF Meta Tracker _______________________________________________________ From zachary.ware+pydev at gmail.com Thu Apr 20 11:20:01 2017 From: zachary.ware+pydev at gmail.com (Zachary Ware) Date: Thu, 20 Apr 2017 10:20:01 -0500 Subject: [Tracker-discuss] bugs.python.org spam Message-ID: Hi David, Since the last 5 issues created by your account on bugs.python.org have been spam [1], I have removed your ability to create issues. If you can provide assurances that you have resolved your spam issues, or provide a non-compromised email address, I would be happy to re-enable your account. [1] http://bugs.python.org/issue?creator=11258&%40sort=creation&%40action=search Regards, -- Zach From metatracker at psf.upfronthosting.co.za Wed Apr 26 01:25:50 2017 From: metatracker at psf.upfronthosting.co.za (Nick Coghlan) Date: Wed, 26 Apr 2017 05:25:50 +0000 Subject: [Tracker-discuss] [issue626] Render GitHub flavoured markdown in tracker messages Message-ID: <1493184350.24.0.961481348861.issue626@psf.upfronthosting.co.za> New submission from Nick Coghlan: With the move to hosting patch reviews on GitHub, I'm definitely noticing the lack of markup support on the issue tracker side of things. There's an old upstream Roundup issue for that at http://issues.roundup-tracker.org/issue2550856 (which I'm in the process of commenting on), but I figured it made sense to track also this as a wishlist item specifically for our instance. ---------- messages: 3338 nosy: ncoghlan priority: wish status: chatting title: Render GitHub flavoured markdown in tracker messages _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Apr 26 01:29:52 2017 From: metatracker at psf.upfronthosting.co.za (Nick Coghlan) Date: Wed, 26 Apr 2017 05:29:52 +0000 Subject: [Tracker-discuss] [issue463] HTTPS only version for login for this tracker In-Reply-To: <1337666026.16.0.0159243982051.issue463@psf.upfronthosting.co.za> Message-ID: <1493184592.43.0.239905492506.issue463@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've added Mark Mangoba (the PSF's Infrastructure Manager) to the nosy list, as the meta-tracker should also be moved to a PSF controlled domain now that bugs.python.org itself has been moved to be directly under PSF management rather than being managed by Upfront Systems. ---------- nosy: +mmangoba, ncoghlan _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Apr 29 13:22:40 2017 From: metatracker at psf.upfronthosting.co.za (Paul Schreiber) Date: Sat, 29 Apr 2017 17:22:40 +0000 Subject: [Tracker-discuss] [issue617] Logging in to bugs.python.org with email address fails In-Reply-To: <1487638633.91.0.556036936497.issue617@psf.upfronthosting.co.za> Message-ID: <1493486560.98.0.765745648724.issue617@psf.upfronthosting.co.za> Paul Schreiber added the comment: Filed upstream as http://issues.roundup-tracker.org/issue2550941 _______________________________________________________ PSF Meta Tracker _______________________________________________________