From metatracker at psf.upfronthosting.co.za Thu Mar 2 06:15:53 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Thu, 02 Mar 2017 11:15:53 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1488453353.0.0.364798464528.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: See https://github.com/python/cpython/commit/0dadf56737f591c83d18db5e445960d39448583e for example. The commit message contains bpo-29655 and there should be a comment similar to http://psf.upfronthosting.co.za/roundup/meta/msg3247 at https://bugs.python.org/issue29655 I haven't gotten any email this time. The last message posted to bpo was http://bugs.python.org/issue29532#msg288347 _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 3 08:08:32 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 03 Mar 2017 13:08:32 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1488546512.28.0.992612879789.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: Update: It looks like it sometimes works for 3.6 branch: * http://bugs.python.org/issue28893#msg288853 (2017-03-03 06:16) But not for master branch: * https://bugs.python.org/issue9303#msg288877 (2017-03-03 13:11) _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 3 16:05:23 2017 From: metatracker at psf.upfronthosting.co.za (Brett C.) Date: Fri, 03 Mar 2017 21:05:23 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1488575123.31.0.529994467515.issue613@psf.upfronthosting.co.za> Brett C. added the comment: No notifications for two PRs on https://bugs.python.org/issue29455. I checked the webhook payload for the 3.6 commit and GitHub got a 400: Connection: close Content-Length: 0 Content-Type: text/html; charset=utf-8 Date: Fri, 03 Mar 2017 20:58:19 GMT Server: BaseHTTP/0.3 Python/2.6.6 Transfer-Encoding: chunked Via: 1.1 psf.upfronthosting.co.za The request was: Request URL: https://bugs.python.org/pull_request Request method: POST content-type: application/json Expect: User-Agent: GitHub-Hookshot/6b02022 X-GitHub-Delivery: 2076d100-0054-11e7-9584-1096a01ee5f0 X-GitHub-Event: push { "ref": "refs/heads/3.6", "before": "21ce65aa67f0dc63002ab0a5fb21ef921cf5279e", "after": "9d07aceedabcdc9826489f8b9baffff056283bb3", "created": false, "deleted": false, "forced": false, "base_ref": null, "compare": "https://github.com/python/cpython/compare/21ce65aa67f0...9d07aceedabc", "commits": [ { "id": "9d07aceedabcdc9826489f8b9baffff056283bb3", "tree_id": "bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4", "distinct": true, "message": "bpo-29455: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)", "timestamp": "2017-03-03T12:58:17-08:00", "url": "https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3", "author": { "name": "Brett Cannon", "email": "brettcannon at users.noreply.github.com", "username": "brettcannon" }, "committer": { "name": "GitHub", "email": "noreply at github.com", "username": "web-flow" }, "added": [ ], "removed": [ ], "modified": [ "Doc/library/trace.rst" ] } ], "head_commit": { "id": "9d07aceedabcdc9826489f8b9baffff056283bb3", "tree_id": "bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4", "distinct": true, "message": "bpo-29455: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)", "timestamp": "2017-03-03T12:58:17-08:00", "url": "https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3", "author": { "name": "Brett Cannon", "email": "brettcannon at users.noreply.github.com", "username": "brettcannon" }, "committer": { "name": "GitHub", "email": "noreply at github.com", "username": "web-flow" }, "added": [ ], "removed": [ ], "modified": [ "Doc/library/trace.rst" ] }, "repository": { "id": 81598961, "name": "cpython", "full_name": "python/cpython", "owner": { "name": "python", "email": "", "login": "python", "id": 1525981, "avatar_url": "https://avatars0.githubusercontent.com/u/1525981?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": "Organization", "site_admin": false }, "private": false, "html_url": "https://github.com/python/cpython", "description": "The Python programming language", "fork": false, "url": "https://github.com/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": 1486754631, "updated_at": "2017-03-03T19:37:47Z", "pushed_at": 1488574698, "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": "https://www.python.org/", "size": 191699, "stargazers_count": 6378, "watchers_count": 6378, "language": "Python", "has_issues": false, "has_downloads": true, "has_wiki": false, "has_pages": false, "forks_count": 521, "mirror_url": null, "open_issues_count": 91, "forks": 521, "open_issues": 91, "watchers": 6378, "default_branch": "master", "stargazers": 6378, "master_branch": "master", "organization": "python" }, "pusher": { "name": "brettcannon", "email": "brettcannon at users.noreply.github.com" }, "organization": { "login": "python", "id": 1525981, "url": "https://api.github.com/orgs/python", "repos_url": "https://api.github.com/orgs/python/repos", "events_url": "https://api.github.com/orgs/python/events", "hooks_url": "https://api.github.com/orgs/python/hooks", "issues_url": "https://api.github.com/orgs/python/issues", "members_url": "https://api.github.com/orgs/python/members{/member}", "public_members_url": "https://api.github.com/orgs/python/public_members{/member}", "avatar_url": "https://avatars0.githubusercontent.com/u/1525981?v=3", "description": "Repositories related to the Python Programming language" }, "sender": { "login": "brettcannon", "id": 54418, "avatar_url": "https://avatars3.githubusercontent.com/u/54418?v=3", "gravatar_id": "", "url": "https://api.github.com/users/brettcannon", "html_url": "https://github.com/brettcannon", "followers_url": "https://api.github.com/users/brettcannon/followers", "following_url": "https://api.github.com/users/brettcannon/following{/other_user}", "gists_url": "https://api.github.com/users/brettcannon/gists{/gist_id}", "starred_url": "https://api.github.com/users/brettcannon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brettcannon/subscriptions", "organizations_url": "https://api.github.com/users/brettcannon/orgs", "repos_url": "https://api.github.com/users/brettcannon/repos", "events_url": "https://api.github.com/users/brettcannon/events{/privacy}", "received_events_url": "https://api.github.com/users/brettcannon/received_events", "type": "User", "site_admin": false }, "distinct_commits": [ { "id": "9d07aceedabcdc9826489f8b9baffff056283bb3", "tree_id": "bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4", "distinct": true, "message": "bpo-29455: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)", "timestamp": "2017-03-03T12:58:17-08:00", "url": "https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3", "author": { "name": "Brett Cannon", "email": "brettcannon at users.noreply.github.com", "username": "brettcannon" }, "committer": { "name": "GitHub", "email": "noreply at github.com", "username": "web-flow" }, "added": [ ], "removed": [ ], "modified": [ "Doc/library/trace.rst" ] } ], "ref_name": "3.6" } _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sun Mar 5 18:13:43 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sun, 05 Mar 2017 23:13:43 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1488755623.88.0.703881565159.issue619@psf.upfronthosting.co.za> Ezio Melotti added the comment: In which cases the committer is set to GitHub? FWIW Maciej recently pushed a change to show both committer and author: https://hg.python.org/tracker/roundup/rev/2defe7a040a7 ---------- status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Mar 8 01:43:01 2017 From: metatracker at psf.upfronthosting.co.za (Nick Coghlan) Date: Wed, 08 Mar 2017 06:43:01 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1488955381.26.0.77335931672.issue613@psf.upfronthosting.co.za> Nick Coghlan added the comment: https://github.com/python/cpython/pull/169 is another case where the "merged" status updated appeared on http://bugs.python.org/issue29537, but there was no notification comment. ---------- nosy: +ncoghlan _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 10 16:07:59 2017 From: metatracker at psf.upfronthosting.co.za (Ned Deily) Date: Fri, 10 Mar 2017 21:07:59 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489180079.5.0.0123769842422.issue613@psf.upfronthosting.co.za> Ned Deily added the comment: Anything we can do to expedite this? It's a real problem with merge/commit information not making it into the bpo issues (other than the list of PR requests). ---------- nosy: +ned.deily priority: bug -> critical _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Mar 15 06:19:22 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Wed, 15 Mar 2017 10:19:22 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1489573162.64.0.489383871569.issue619@psf.upfronthosting.co.za> Berker Peksag added the comment: I might miss some other cases, but for example, when you edit a file on GitHub or when you merge your own PR. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 17 05:20:00 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 17 Mar 2017 09:20:00 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489742400.33.0.0601913842914.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: I believe the 400 status code comes from one of the "raise Reject()" lines in roundup/github.py. I will try to add some descriptive messages to them to help debug the issue. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 17 06:16:30 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 17 Mar 2017 10:16:30 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489745790.77.0.0669971684822.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: Here is a patch that tweaks some exception messages and adds logging.error() calls in GitHubHandler class. _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/roundup/github.py b/roundup/github.py --- a/roundup/github.py +++ b/roundup/github.py @@ -41,20 +41,21 @@ class GitHubHandler: def dispatch(self): try: self.verify_request() self.validate_webhook_secret() self.extract() except (Unauthorised, MethodNotAllowed, UnsupportedMediaType, Reject) as err: + logging.error(err, exc_info=True) raise except Exception as err: logging.error(err, exc_info=True) - raise Reject() + raise Reject(err) def extract(self): """ This method is responsible for extracting information from GitHub event and decide what to do with it more. Currently it knows how to handle pull requests and comments. """ event = self.get_event() @@ -77,18 +78,19 @@ class GitHubHandler: """ Validates request signature against SECRET_KEY environment variable. This verification is based on HMAC hex digest calculated from the sent payload. The value of SECRET_KEY should be exactly the same as the one configured in GitHub webhook secret field. """ key = os.environ.get('SECRET_KEY') if key is None: - logging.error('Missing SECRET_KEY environment variable set!') - raise Reject() + msg = 'Missing SECRET_KEY environment variable set!' + logging.error(msg) + raise Reject(msg) data = str(self.form.value) signature = 'sha1=' + hmac.new(key, data, hashlib.sha1).hexdigest() header_signature = self.request.headers.get('X-Hub-Signature', '') if not compare_digest(signature, header_signature): raise Unauthorised() def verify_request(self): @@ -97,17 +99,19 @@ class GitHubHandler: """ method = self.env.get('REQUEST_METHOD', None) if method != 'POST': raise MethodNotAllowed() content_type = self.env.get('CONTENT_TYPE', None) if content_type != 'application/json': raise UnsupportedMediaType() if self.get_event() is None: - raise Reject() + msg = 'no X-GitHub-Event header found in the request headers' + logging.error(msg) + raise Reject(msg) def get_event(self): """ Extracts GitHub event from header field. """ return self.request.headers.get('X-GitHub-Event', None) @@ -327,17 +331,17 @@ class Push(Event): """ Class responsible for handling push events. """ def get_github_username(self): """ Extract GitHub username from a push event. """ - return self.data.get('pusher', []).get('name', '') + return self.data.get('pusher', {}).get('name', '') def dispatch(self): """ Main method responsible for responding to incoming GitHub event. """ self.set_roundup_user() commits = self.data.get('commits', []) ref = self.data.get('ref', 'refs/heads/master') @@ -352,17 +356,17 @@ class Push(Event): if issue_id not in messages: messages[issue_id] = (u'', False) curr_msg, curr_close = messages[issue_id] # we append the new message to the other and do binary OR # on close, so that at least one information will actually # close the issue messages[issue_id] = (curr_msg + u'\n' + msg, curr_close or close) if not messages: - return + return 'zero messages created' for issue_id, (msg, close) in messages.iteritems(): # add comments to appropriate issues... id = issue_id.encode('utf-8') try: issue_msgs = self.db.issue.get(id, 'messages') except IndexError: # See meta issue #613: the commit message might also include # PR ids that shouldn't be included. From metatracker at psf.upfronthosting.co.za Fri Mar 17 07:06:16 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 17 Mar 2017 11:06:16 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489748776.09.0.460364740437.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: I converted Brett's payload example to a test case and I couldn't be able to create a failing test case. Here is a patch with a test. _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/roundup/github.py b/roundup/github.py --- a/roundup/github.py +++ b/roundup/github.py @@ -41,20 +41,21 @@ class GitHubHandler: def dispatch(self): try: self.verify_request() self.validate_webhook_secret() self.extract() except (Unauthorised, MethodNotAllowed, UnsupportedMediaType, Reject) as err: + logging.error(err, exc_info=True) raise except Exception as err: logging.error(err, exc_info=True) - raise Reject() + raise Reject(err) def extract(self): """ This method is responsible for extracting information from GitHub event and decide what to do with it more. Currently it knows how to handle pull requests and comments. """ event = self.get_event() @@ -77,18 +78,19 @@ class GitHubHandler: """ Validates request signature against SECRET_KEY environment variable. This verification is based on HMAC hex digest calculated from the sent payload. The value of SECRET_KEY should be exactly the same as the one configured in GitHub webhook secret field. """ key = os.environ.get('SECRET_KEY') if key is None: - logging.error('Missing SECRET_KEY environment variable set!') - raise Reject() + msg = 'Missing SECRET_KEY environment variable set!' + logging.error(msg) + raise Reject(msg) data = str(self.form.value) signature = 'sha1=' + hmac.new(key, data, hashlib.sha1).hexdigest() header_signature = self.request.headers.get('X-Hub-Signature', '') if not compare_digest(signature, header_signature): raise Unauthorised() def verify_request(self): @@ -97,17 +99,19 @@ class GitHubHandler: """ method = self.env.get('REQUEST_METHOD', None) if method != 'POST': raise MethodNotAllowed() content_type = self.env.get('CONTENT_TYPE', None) if content_type != 'application/json': raise UnsupportedMediaType() if self.get_event() is None: - raise Reject() + msg = 'no X-GitHub-Event header found in the request headers' + logging.error(msg) + raise Reject(msg) def get_event(self): """ Extracts GitHub event from header field. """ return self.request.headers.get('X-GitHub-Event', None) @@ -352,17 +356,17 @@ class Push(Event): if issue_id not in messages: messages[issue_id] = (u'', False) curr_msg, curr_close = messages[issue_id] # we append the new message to the other and do binary OR # on close, so that at least one information will actually # close the issue messages[issue_id] = (curr_msg + u'\n' + msg, curr_close or close) if not messages: - return + return 'zero messages created' for issue_id, (msg, close) in messages.iteritems(): # add comments to appropriate issues... id = issue_id.encode('utf-8') try: issue_msgs = self.db.issue.get(id, 'messages') except IndexError: # See meta issue #613: the commit message might also include # PR ids that shouldn't be included. diff --git a/test/data/pushevent6.txt b/test/data/pushevent6.txt new file mode 100644 --- /dev/null +++ b/test/data/pushevent6.txt @@ -0,0 +1,11 @@ +POST /python-dev/pull_request HTTP/1.1 +Host: 3ab1787e.ngrok.io +Accept: */* +User-Agent: GitHub-Hookshot/6b02022 +X-GitHub-Delivery: 2076d100-0054-11e7-9584-1096a01ee5f0 +X-GitHub-Event: push +content-type: application/json +X-Hub-Signature: sha1=f7557283b2cb821aafcbb5b7f44001c237795c96 +Content-Length: 8426 + +{"ref":"refs/heads/3.6","before":"21ce65aa67f0dc63002ab0a5fb21ef921cf5279e","after":"9d07aceedabcdc9826489f8b9baffff056283bb3","created":false,"deleted":false,"forced":false,"base_ref":null,"compare":"https://github.com/python/cpython/compare/21ce65aa67f0...9d07aceedabc","commits":[{"id":"9d07aceedabcdc9826489f8b9baffff056283bb3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]}],"head_commit":{"id":"9d07aceedabcdc9826489f8b9baffff056283b b3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]},"repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","owner":{"name":"python","email":"","login":"python","id":1525981,"avatar_url":"https://avatars0.githubusercontent.com/u/1525981?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":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"The Python programming language","fork":false,"url":"https://github.com/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":"h ttps://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.g ithub.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":1486754631,"updated_at":"2017-03-03T19:37:47Z","pushed_at":1488574698,"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":"https://www.python.org/","size":191699,"stargazers_count":6378,"watchers_count":6378,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_p ages":false,"forks_count":521,"mirror_url":null,"open_issues_count":91,"forks":521,"open_issues":91,"watchers":6378,"default_branch":"master","stargazers":6378,"master_branch":"master","organization":"python"},"pusher":{"name":"brettcannon","email":"brettcannon at users.noreply.github.com"},"organization":{"login":"python","id":1525981,"url":"https://api.github.com/orgs/python","repos_url":"https://api.github.com/orgs/python/repos","events_url":"https://api.github.com/orgs/python/events","hooks_url":"https://api.github.com/orgs/python/hooks","issues_url":"https://api.github.com/orgs/python/issues","members_url":"https://api.github.com/orgs/python/members{/member}","public_members_url":"https://api.github.com/orgs/python/public_members{/member}","avatar_url":"https://avatars0.githubusercontent.com/u/1525981?v=3","description":"Repositories related to the Python Programming language"},"sender":{"login":"brettcannon","id":54418,"avatar_url":"https://avatars3.githubusercontent.com/ u/54418?v=3","gravatar_id":"","url":"https://api.github.com/users/brettcannon","html_url":"https://github.com/brettcannon","followers_url":"https://api.github.com/users/brettcannon/followers","following_url":"https://api.github.com/users/brettcannon/following{/other_user}","gists_url":"https://api.github.com/users/brettcannon/gists{/gist_id}","starred_url":"https://api.github.com/users/brettcannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettcannon/subscriptions","organizations_url":"https://api.github.com/users/brettcannon/orgs","repos_url":"https://api.github.com/users/brettcannon/repos","events_url":"https://api.github.com/users/brettcannon/events{/privacy}","received_events_url":"https://api.github.com/users/brettcannon/received_events","type":"User","site_admin":false},"distinct_commits":[{"id":"9d07aceedabcdc9826489f8b9baffff056283bb3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention covera ge.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]}],"ref_name":"3.6"} diff --git a/test/test_github.py b/test/test_github.py --- a/test/test_github.py +++ b/test/test_github.py @@ -411,16 +411,34 @@ https://github.com/python/cpython/commit # message should be added only if commit is pushed into master/2.x/3.x branches dummy_client = self._make_client('pushevent5.txt') handler = GitHubHandler(dummy_client) handler.dispatch() # issue should not have any messages msgs = self.db.issue.get('1', 'messages') self.assertEqual(len(msgs), 0) + def testPushEventFooBar(self): + dummy_client = self._make_client('pushevent6.txt') + handler = GitHubHandler(dummy_client) + handler.dispatch() + msgs = self.db.issue.get('1', 'messages') + self.assertEqual(len(msgs), 1) + content = self.db.msg.get(msgs[0], 'content') + self.assertIn( + "New changeset 9d07aceedabcdc9826489f8b9baffff056283bb3 by GitHub " + "(Brett Cannon) in branch '3.6':", + content + ) + self.assertIn( + 'bpo-1: Mention coverage.py in trace module documentation (GH-435)', + content + ) + + def test_suite(): suite = unittest.TestSuite() for l in list_backends(): dct = dict(backend=l) subcls = type(TestCase)('TestCase_%s' % l, (TestCase,), dct) suite.addTest(unittest.makeSuite(subcls)) return suite From metatracker at psf.upfronthosting.co.za Fri Mar 17 07:41:00 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 17 Mar 2017 11:41:00 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1489750860.99.0.448948393211.issue619@psf.upfronthosting.co.za> Berker Peksag added the comment: You can see an example of this in the patch I posted at http://psf.upfronthosting.co.za/roundup/meta/issue613: New changeset 9d07aceedabcdc9826489f8b9baffff056283bb3 by GitHub (Brett Cannon) in branch '3.6': bpo-1: Mention coverage.py in trace module documentation (GH-435) _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 17 07:58:26 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 17 Mar 2017 11:58:26 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1489751906.81.0.0560225217817.issue619@psf.upfronthosting.co.za> Berker Peksag added the comment: Here is a patch. _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/roundup/github.py b/roundup/github.py --- a/roundup/github.py +++ b/roundup/github.py @@ -395,19 +395,23 @@ class Push(Event): for match in matches: data = match.groupdict() # check for duplicated issue numbers in the same commit msg if data['issue_id'] in messages: continue close = bool(data.get('verb')) author=commit.get('author', {}).get('name', '') committer=commit.get('committer', {}).get('name', '') - author_line = committer - if author != committer: - author_line = u"{} ({})".format(committer, author) + # sometimes the committer name can be set to 'GitHub' (see #619) + if committer != u'GitHub': + author_line = committer + if author != committer: + author_line = u"{} ({})".format(committer, author) + else: + author_line = author messages[data['issue_id']] = (COMMENT_TEMPLATE.format( author=author_line, branch=branch, changeset_id=commit.get('id', ''), changeset_url=commit.get('url', ''), commit_msg=description.splitlines()[0], ), close) return messages diff --git a/test/data/pushevent6.txt b/test/data/pushevent6.txt new file mode 100644 --- /dev/null +++ b/test/data/pushevent6.txt @@ -0,0 +1,11 @@ +POST /python-dev/pull_request HTTP/1.1 +Host: 3ab1787e.ngrok.io +Accept: */* +User-Agent: GitHub-Hookshot/6b02022 +X-GitHub-Delivery: 2076d100-0054-11e7-9584-1096a01ee5f0 +X-GitHub-Event: push +content-type: application/json +X-Hub-Signature: sha1=f7557283b2cb821aafcbb5b7f44001c237795c96 +Content-Length: 8426 + +{"ref":"refs/heads/3.6","before":"21ce65aa67f0dc63002ab0a5fb21ef921cf5279e","after":"9d07aceedabcdc9826489f8b9baffff056283bb3","created":false,"deleted":false,"forced":false,"base_ref":null,"compare":"https://github.com/python/cpython/compare/21ce65aa67f0...9d07aceedabc","commits":[{"id":"9d07aceedabcdc9826489f8b9baffff056283bb3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]}],"head_commit":{"id":"9d07aceedabcdc9826489f8b9baffff056283b b3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]},"repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","owner":{"name":"python","email":"","login":"python","id":1525981,"avatar_url":"https://avatars0.githubusercontent.com/u/1525981?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":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"The Python programming language","fork":false,"url":"https://github.com/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":"h ttps://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.g ithub.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":1486754631,"updated_at":"2017-03-03T19:37:47Z","pushed_at":1488574698,"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":"https://www.python.org/","size":191699,"stargazers_count":6378,"watchers_count":6378,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_p ages":false,"forks_count":521,"mirror_url":null,"open_issues_count":91,"forks":521,"open_issues":91,"watchers":6378,"default_branch":"master","stargazers":6378,"master_branch":"master","organization":"python"},"pusher":{"name":"brettcannon","email":"brettcannon at users.noreply.github.com"},"organization":{"login":"python","id":1525981,"url":"https://api.github.com/orgs/python","repos_url":"https://api.github.com/orgs/python/repos","events_url":"https://api.github.com/orgs/python/events","hooks_url":"https://api.github.com/orgs/python/hooks","issues_url":"https://api.github.com/orgs/python/issues","members_url":"https://api.github.com/orgs/python/members{/member}","public_members_url":"https://api.github.com/orgs/python/public_members{/member}","avatar_url":"https://avatars0.githubusercontent.com/u/1525981?v=3","description":"Repositories related to the Python Programming language"},"sender":{"login":"brettcannon","id":54418,"avatar_url":"https://avatars3.githubusercontent.com/ u/54418?v=3","gravatar_id":"","url":"https://api.github.com/users/brettcannon","html_url":"https://github.com/brettcannon","followers_url":"https://api.github.com/users/brettcannon/followers","following_url":"https://api.github.com/users/brettcannon/following{/other_user}","gists_url":"https://api.github.com/users/brettcannon/gists{/gist_id}","starred_url":"https://api.github.com/users/brettcannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettcannon/subscriptions","organizations_url":"https://api.github.com/users/brettcannon/orgs","repos_url":"https://api.github.com/users/brettcannon/repos","events_url":"https://api.github.com/users/brettcannon/events{/privacy}","received_events_url":"https://api.github.com/users/brettcannon/received_events","type":"User","site_admin":false},"distinct_commits":[{"id":"9d07aceedabcdc9826489f8b9baffff056283bb3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention covera ge.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]}],"ref_name":"3.6"} diff --git a/test/test_github.py b/test/test_github.py --- a/test/test_github.py +++ b/test/test_github.py @@ -411,16 +411,31 @@ https://github.com/python/cpython/commit # message should be added only if commit is pushed into master/2.x/3.x branches dummy_client = self._make_client('pushevent5.txt') handler = GitHubHandler(dummy_client) handler.dispatch() # issue should not have any messages msgs = self.db.issue.get('1', 'messages') self.assertEqual(len(msgs), 0) + def testPushEventDontUseGitHubAsCommitter(self): + # we don't need to use the committer information if it sets to 'GitHub' + dummy_client = self._make_client('pushevent6.txt') + handler = GitHubHandler(dummy_client) + handler.dispatch() + msgs = self.db.issue.get('1', 'messages') + self.assertEqual(len(msgs), 1) + content = self.db.msg.get(msgs[0], 'content') + self.assertEqual( + content.splitlines()[1], # the first item is an empty line + "New changeset 9d07aceedabcdc9826489f8b9baffff056283bb3 by " + "Brett Cannon in branch '3.6':" + ) + + def test_suite(): suite = unittest.TestSuite() for l in list_backends(): dct = dict(backend=l) subcls = type(TestCase)('TestCase_%s' % l, (TestCase,), dct) suite.addTest(unittest.makeSuite(subcls)) return suite From metatracker at psf.upfronthosting.co.za Fri Mar 17 18:22:38 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Fri, 17 Mar 2017 22:22:38 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489789358.69.0.833080550759.issue613@psf.upfronthosting.co.za> Maciej Szulik added the comment: Brett, the most worrying thing is missing `X-Hub-Signature` header in the request from http://psf.upfronthosting.co.za/roundup/meta/msg3281. I've uploaded tweaked patch from Berker but I've mostly switched to logging, we don't want to simplify hacking our tracker, too much returning exact information what went wrong. Most importantly I've added X-GitHub-Delivery, so it's easier to track the actual requests on GH. Additionally I've fixed author matching if committer is GitHub, we ignore that information (this happens when using GH UI). _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/roundup/github.py b/roundup/github.py --- a/roundup/github.py +++ b/roundup/github.py @@ -46,8 +46,11 @@ self.extract() except (Unauthorised, MethodNotAllowed, UnsupportedMediaType, Reject) as err: + logging.error('X-GitHub-Delivery: %s', self.get_delivery()) + logging.error(err, exc_info=True) raise except Exception as err: + logging.error('X-GitHub-Delivery: %s', self.get_delivery()) logging.error(err, exc_info=True) raise Reject() @@ -70,8 +73,11 @@ handler.dispatch() elif event == 'push': data = json.loads(self.form.value) - handler = Push(self.db, data) + handler = Push(self.db, data, self.get_delivery()) handler.dispatch() + else: + logging.error('X-GitHub-Delivery: %s', self.get_delivery()) + logging.error('Unknown event %s', event) def validate_webhook_secret(self): """ @@ -102,6 +108,8 @@ if content_type != 'application/json': raise UnsupportedMediaType() if self.get_event() is None: + logging.error('X-GitHub-Delivery: %s', self.get_delivery()) + logging.error('no X-GitHub-Event header found in the request headers') raise Reject() def get_event(self): @@ -110,6 +118,12 @@ """ return self.request.headers.get('X-GitHub-Event', None) + def get_delivery(self): + """ + Extracts GitHub delivery id. + """ + return self.request.headers.get('X-GitHub-Delivery', None) + class Event(object): """ @@ -328,6 +342,11 @@ Class responsible for handling push events. """ + def __init__(self, db, data, delivery): + self.db = db + self.data = data + self.delivery = delivery + def get_github_username(self): """ Extract GitHub username from a push event. @@ -342,7 +361,7 @@ commits = self.data.get('commits', []) ref = self.data.get('ref', 'refs/heads/master') # messages dictionary maps issue number to a tuple containing - # the message to be posted as a comment an boolean flag informing + # the message to be posted as a comment and a boolean flag informing # if the issue should be 'closed' messages = {} # extract commit messages @@ -357,6 +376,7 @@ # close the issue messages[issue_id] = (curr_msg + u'\n' + msg, curr_close or close) if not messages: + logging.error('zero messages created for %s', self.delivery) return for issue_id, (msg, close) in messages.iteritems(): # add comments to appropriate issues... @@ -398,9 +418,14 @@ if data['issue_id'] in messages: continue close = bool(data.get('verb')) - author=commit.get('author', {}).get('name', '') - committer=commit.get('committer', {}).get('name', '') + author = commit.get('author', {}).get('name', '') + committer = commit.get('committer', {}).get('name', '') + # committer should not be GitHub bot, fallback to original author + # in these cases, this happens when using GitHub UI + if committer == "GitHub": + committer = author author_line = committer + # check if the author and committer are different persons if author != committer: author_line = u"{} ({})".format(committer, author) messages[data['issue_id']] = (COMMENT_TEMPLATE.format( diff --git a/test/data/pushevent6.txt b/test/data/pushevent6.txt new file mode 100644 --- /dev/null +++ b/test/data/pushevent6.txt @@ -0,0 +1,11 @@ +POST /python-dev/pull_request HTTP/1.1 +Host: 3ab1787e.ngrok.io +Accept: */* +User-Agent: GitHub-Hookshot/6b02022 +X-GitHub-Delivery: 2076d100-0054-11e7-9584-1096a01ee5f0 +X-GitHub-Event: push +content-type: application/json +X-Hub-Signature: sha1=f7557283b2cb821aafcbb5b7f44001c237795c96 +Content-Length: 8426 + +{"ref":"refs/heads/3.6","before":"21ce65aa67f0dc63002ab0a5fb21ef921cf5279e","after":"9d07aceedabcdc9826489f8b9baffff056283bb3","created":false,"deleted":false,"forced":false,"base_ref":null,"compare":"https://github.com/python/cpython/compare/21ce65aa67f0...9d07aceedabc","commits":[{"id":"9d07aceedabcdc9826489f8b9baffff056283bb3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]}],"head_commit":{"id":"9d07aceedabcdc9826489f8b9baffff056283b b3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention coverage.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]},"repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","owner":{"name":"python","email":"","login":"python","id":1525981,"avatar_url":"https://avatars0.githubusercontent.com/u/1525981?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":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"The Python programming language","fork":false,"url":"https://github.com/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":"h ttps://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.g ithub.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":1486754631,"updated_at":"2017-03-03T19:37:47Z","pushed_at":1488574698,"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":"https://www.python.org/","size":191699,"stargazers_count":6378,"watchers_count":6378,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_p ages":false,"forks_count":521,"mirror_url":null,"open_issues_count":91,"forks":521,"open_issues":91,"watchers":6378,"default_branch":"master","stargazers":6378,"master_branch":"master","organization":"python"},"pusher":{"name":"brettcannon","email":"brettcannon at users.noreply.github.com"},"organization":{"login":"python","id":1525981,"url":"https://api.github.com/orgs/python","repos_url":"https://api.github.com/orgs/python/repos","events_url":"https://api.github.com/orgs/python/events","hooks_url":"https://api.github.com/orgs/python/hooks","issues_url":"https://api.github.com/orgs/python/issues","members_url":"https://api.github.com/orgs/python/members{/member}","public_members_url":"https://api.github.com/orgs/python/public_members{/member}","avatar_url":"https://avatars0.githubusercontent.com/u/1525981?v=3","description":"Repositories related to the Python Programming language"},"sender":{"login":"brettcannon","id":54418,"avatar_url":"https://avatars3.githubusercontent.com/ u/54418?v=3","gravatar_id":"","url":"https://api.github.com/users/brettcannon","html_url":"https://github.com/brettcannon","followers_url":"https://api.github.com/users/brettcannon/followers","following_url":"https://api.github.com/users/brettcannon/following{/other_user}","gists_url":"https://api.github.com/users/brettcannon/gists{/gist_id}","starred_url":"https://api.github.com/users/brettcannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettcannon/subscriptions","organizations_url":"https://api.github.com/users/brettcannon/orgs","repos_url":"https://api.github.com/users/brettcannon/repos","events_url":"https://api.github.com/users/brettcannon/events{/privacy}","received_events_url":"https://api.github.com/users/brettcannon/received_events","type":"User","site_admin":false},"distinct_commits":[{"id":"9d07aceedabcdc9826489f8b9baffff056283bb3","tree_id":"bad6e533cdf6cdf15f9a6f5cda466e52e54d57b4","distinct":true,"message":"bpo-1: Mention covera ge.py in trace module documentation (GH-435)\n\n(cherry picked from commit 5dfccb06dc513ae67fac5fee66356ad58a4de170)","timestamp":"2017-03-03T12:58:17-08:00","url":"https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3","author":{"name":"Brett Cannon","email":"brettcannon at users.noreply.github.com","username":"brettcannon"},"committer":{"name":"GitHub","email":"noreply at github.com","username":"web-flow"},"added":[],"removed":[],"modified":["Doc/library/trace.rst"]}],"ref_name":"3.6"} diff --git a/test/test_github.py b/test/test_github.py --- a/test/test_github.py +++ b/test/test_github.py @@ -416,6 +416,19 @@ msgs = self.db.issue.get('1', 'messages') self.assertEqual(len(msgs), 0) + def testPushEvent613(self): + dummy_client = self._make_client('pushevent6.txt') + handler = GitHubHandler(dummy_client) + handler.dispatch() + msgs = self.db.issue.get('1', 'messages') + self.assertEqual(len(msgs), 1) + content = self.db.msg.get(msgs[0], 'content') + self.assertIn("""New changeset 9d07aceedabcdc9826489f8b9baffff056283bb3 by Brett Cannon in branch '3.6': +bpo-1: Mention coverage.py in trace module documentation (GH-435) +https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3 +""", + content) + def test_suite(): suite = unittest.TestSuite() for l in list_backends(): From metatracker at psf.upfronthosting.co.za Fri Mar 17 18:25:30 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Fri, 17 Mar 2017 22:25:30 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489789530.38.0.0963002647514.issue613@psf.upfronthosting.co.za> Maciej Szulik added the comment: Brett, can I ask you to send me directly (or attach here) some of those rejected requests? Based on the current one I don't see anything suspicious, but maybe I'm overlooking something... _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 17 18:39:28 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 17 Mar 2017 22:39:28 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489790368.13.0.81948488141.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: Note that there is an open issue for the committer name thing: http://psf.upfronthosting.co.za/roundup/meta/issue619 _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 17 18:53:56 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Fri, 17 Mar 2017 22:53:56 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1489791236.5.0.987147753255.issue619@psf.upfronthosting.co.za> Maciej Szulik added the comment: I've created alternate solution in this patch: http://psf.upfronthosting.co.za/roundup/meta/file459/issue613.patch ---------- nosy: +maciej.szulik _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 17 19:02:46 2017 From: metatracker at psf.upfronthosting.co.za (Brett C.) Date: Fri, 17 Mar 2017 23:02:46 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1489791766.49.0.824191159949.issue613@psf.upfronthosting.co.za> Brett C. added the comment: First, don't worry about the x-github-signature missing. It's the last line of the headers shown in the GitHub UI and so it's quite possible i just botched my copy-and-paste. And I will upload the headers, 400 response, and JSON body of the most recently failed message (95193780-0b4b-11e7-8357-5888fe9c2898 on 2017-03-17 12:54:51). _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Mar 21 16:09:04 2017 From: metatracker at psf.upfronthosting.co.za (Ron Lee Pound) Date: Tue, 21 Mar 2017 20:09:04 +0000 Subject: [Tracker-discuss] [issue620] "calendar" with python 2.7.13 does not handle leap year properly Message-ID: <1490126944.34.0.589398336815.issue620@psf.upfronthosting.co.za> New submission from Ron Lee Pound: The gregorian calendar (our current calendar) does not have leap year on years evenly divisable by 400. Yet calendar recognizes year 2000 as a leap year when it is not. Also shows up with calendar.isleap(2000) should be false ---------- messages: 3296 nosy: Ron Pound priority: bug status: unread title: "calendar" with python 2.7.13 does not handle leap year properly topic: tracker _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Mar 21 16:14:50 2017 From: metatracker at psf.upfronthosting.co.za (Zachary Ware) Date: Tue, 21 Mar 2017 20:14:50 +0000 Subject: [Tracker-discuss] [issue620] "calendar" with python 2.7.13 does not handle leap year properly In-Reply-To: <1490126944.34.0.589398336815.issue620@psf.upfronthosting.co.za> Message-ID: <1490127290.12.0.182410473992.issue620@psf.upfronthosting.co.za> Zachary Ware added the comment: This is not the correct tracker for Python bugs, that tracker is bugs.python.org. This tracker is for issues with bugs.python.org (aka the meta tracker). No need to file this issue at b.p.o, though; the calendar module is correct. Years evenly divisible by 4 are leap years, except years evenly divisible by 100 which are not leap years, except years evenly divisible by 400 which *are* leap years. >>> calendar.isleap(1896) True >>> calendar.isleap(1900) False >>> calendar.isleap(1904) True >>> calendar.isleap(1996) True >>> calendar.isleap(2000) True >>> calendar.isleap(2004) True ---------- nosy: +zach.ware status: unread -> resolved topic: -tracker _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Mar 21 16:23:36 2017 From: metatracker at psf.upfronthosting.co.za (Ron Lee Pound) Date: Tue, 21 Mar 2017 20:23:36 +0000 Subject: [Tracker-discuss] [issue620] "calendar" with python 2.7.13 does not handle leap year properly In-Reply-To: <1490127290.12.0.182410473992.issue620@psf.upfronthosting.co.za> Message-ID: Ron Lee Pound added the comment: Very sorry, my mistake.I will be more carefull next time. TNX On Tue, Mar 21, 2017 at 1:14 PM, Zachary Ware < metatracker at psf.upfronthosting.co.za> wrote: > > Zachary Ware added the comment: > > This is not the correct tracker for Python bugs, that tracker is > bugs.python.org. This tracker is for issues with bugs.python.org (aka > the meta tracker). > > No need to file this issue at b.p.o, though; the calendar module is > correct. Years evenly divisible by 4 are leap years, except years evenly > divisible by 100 which are not leap years, except years evenly divisible by > 400 which *are* leap years. > > >>> calendar.isleap(1896) > True > >>> calendar.isleap(1900) > False > >>> calendar.isleap(1904) > True > >>> calendar.isleap(1996) > True > >>> calendar.isleap(2000) > True > >>> calendar.isleap(2004) > True > > ---------- > nosy: +zach.ware > status: unread -> resolved > topic: -tracker > > _______________________________________________________ > PSF Meta Tracker > > _______________________________________________________ > _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Mar 22 19:09:45 2017 From: metatracker at psf.upfronthosting.co.za (Siddharth Velankar) Date: Wed, 22 Mar 2017 23:09:45 +0000 Subject: [Tracker-discuss] [issue621] Pull request reopened but the PR still shows closed in bug tracker Message-ID: <1490224185.13.0.282607681043.issue621@psf.upfronthosting.co.za> New submission from Siddharth Velankar: I opened a PR request for an issue on the bug tracker, closed it and then reopened it - all within a span of a few minutes but the PR still shows as "Closed" in the bug tracker. Any ideas on how to correct this (change the status to "Open") on the bug tracker? Please let me know. Bug # - 29674 Pull request - #669 ---------- messages: 3299 nosy: svelankar priority: bug status: unread title: Pull request reopened but the PR still shows closed in bug tracker _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Mar 23 02:10:09 2017 From: metatracker at psf.upfronthosting.co.za (Anish Shah) Date: Thu, 23 Mar 2017 06:10:09 +0000 Subject: [Tracker-discuss] [issue621] Pull request reopened but the PR still shows closed in bug tracker In-Reply-To: <1490224185.13.0.282607681043.issue621@psf.upfronthosting.co.za> Message-ID: <1490249409.02.0.0569693763149.issue621@psf.upfronthosting.co.za> Anish Shah added the comment: I can work on this! :) ---------- nosy: +anish.shah, maciej.szulik status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Mar 23 18:12:38 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Thu, 23 Mar 2017 22:12:38 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1490307158.56.0.21257935491.issue619@psf.upfronthosting.co.za> Maciej Szulik added the comment: Updated patch with my changes applied here: https://hg.python.org/tracker/roundup/rev/6d6954a7b401 ---------- status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Mar 23 18:13:17 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Thu, 23 Mar 2017 22:13:17 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490307197.68.0.310449459953.issue613@psf.upfronthosting.co.za> Maciej Szulik added the comment: I've added more logging: https://hg.python.org/tracker/roundup/rev/b5c6f372b227 _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 09:18:27 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Fri, 24 Mar 2017 13:18:27 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490361507.21.0.47157666805.issue613@psf.upfronthosting.co.za> Ezio Melotti added the comment: I've been looking at the logs overnight and these are the few errors I got so far (timestamps should be UTC): [24/Mar/2017 08:23:44] "POST /tracker/pull_request HTTP/1.1" 200 - ERROR:root:zero messages created for 31bb6800-106b-11e7-91cd-85bcd980655d [24/Mar/2017 08:26:08] "POST /tracker/pull_request HTTP/1.1" 200 - ERROR:root:zero messages created for 87901000-106b-11e7-8ffe-9f76236c3a84 [24/Mar/2017 11:20:42] "POST /tracker/pull_request HTTP/1.1" 200 - ERROR:root:zero messages created for e9f50a80-1083-11e7-96e7-81ffe1ed7d05 [24/Mar/2017 11:21:46] "POST /tracker/pull_request HTTP/1.1" 200 - ERROR:root:zero messages created for 0bee8d00-1084-11e7-8be1-b103588f1b04 (I've tried to find these on GitHub myself, but either they are well hidden, or I don't have access to it.) _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 11:52:22 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 24 Mar 2017 15:52:22 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490370742.84.0.155496964895.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: I think you need to be an administrator on that repo to see the payloads. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 11:58:04 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 24 Mar 2017 15:58:04 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1490371084.7.0.809328704461.issue619@psf.upfronthosting.co.za> Berker Peksag added the comment: Next time please let me push my own patches. If you have comments please left them in the issue first. Doing your own thing on my patches without even try to communicate is a bit rude. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 11:59:41 2017 From: metatracker at psf.upfronthosting.co.za (Maciej Szulik) Date: Fri, 24 Mar 2017 15:59:41 +0000 Subject: [Tracker-discuss] [issue619] Use author's name if committer is set to GitHub on commit notifications In-Reply-To: <1487729519.58.0.259472313196.issue619@psf.upfronthosting.co.za> Message-ID: <1490371181.04.0.980960734814.issue619@psf.upfronthosting.co.za> Maciej Szulik added the comment: Sorry Berker, didn't want to offend you by doing so. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 12:43:33 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Fri, 24 Mar 2017 16:43:33 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490373813.13.0.797126691555.issue613@psf.upfronthosting.co.za> Ezio Melotti added the comment: I asked for access, and looked at the payloads. The 4 errors mentioned in the previous message are just push messages that don't reference any bpo issue, so they are not really errors (and they were delivered correctly). I found older payloads that failed with a 400 and tried to redeliver them. I was then able to get an error from Roundup: the problem only showed up when the author and committer were different people, and the code was trying to format a string using a syntax only supported by 2.7. The tracker is still running on 2.6, so it was failing. I now fixed it (https://hg.python.org/tracker/roundup/rev/7d5f2a9f5f34) and tried to redeliver a few payloads, and the deliver was successful. Should I go back to redeliver all the payloads? It might cause some noise and confusion, but at least we will have proper references in the issues. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 12:57:47 2017 From: metatracker at psf.upfronthosting.co.za (Ned Deily) Date: Fri, 24 Mar 2017 16:57:47 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490374667.52.0.487789984271.issue613@psf.upfronthosting.co.za> Ned Deily added the comment: My instinct would be to deliver them. Having a reasonably accurate record of pushes/commits in a b.p.o has proven to be crucially important to me over the years when I have to go back and investigate the history of some problem. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 14:26:03 2017 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 24 Mar 2017 18:26:03 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490379963.2.0.13715128848.issue613@psf.upfronthosting.co.za> Berker Peksag added the comment: I agree with Ned. Thanks, Ezio! _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 16:14:06 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Fri, 24 Mar 2017 20:14:06 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490386446.51.0.351889876882.issue613@psf.upfronthosting.co.za> Ezio Melotti added the comment: While going through the other failed request, I found and fixed another bug: https://hg.python.org/tracker/roundup/rev/f04116acd3d8 While fixing that bug and reading the code I also noticed another unrelated bug -- Maciej is taking care of it. There's also another bug related to notification that will be fixed next. ---------- status: chatting -> in-progress _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 18:11:47 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Fri, 24 Mar 2017 22:11:47 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490393506.99.0.21663706122.issue613@psf.upfronthosting.co.za> Ezio Melotti added the comment: Other bug fixed: https://hg.python.org/tracker/roundup/rev/1da702d3cf41 Maciej also fixed https://hg.python.org/tracker/roundup/rev/8c49b7b2bc8f and https://hg.python.org/tracker/roundup/rev/e58c841100f8 I'm still going through all the failed requests and sending them, and so far they are all succeeding. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 21:05:17 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sat, 25 Mar 2017 01:05:17 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490403917.14.0.324110857578.issue613@psf.upfronthosting.co.za> Ezio Melotti added the comment: I successfully redelivered all the requests, so all known bugs should be fixed now. ---------- assignedto: -> ezio.melotti status: in-progress -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 24 21:46:28 2017 From: metatracker at psf.upfronthosting.co.za (Ned Deily) Date: Sat, 25 Mar 2017 01:46:28 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490406388.0.0.521778175116.issue613@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Ezio! Having those messages there really makes a big difference! _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Mar 25 01:41:42 2017 From: metatracker at psf.upfronthosting.co.za (Nick Coghlan) Date: Sat, 25 Mar 2017 05:41:42 +0000 Subject: [Tracker-discuss] [issue613] Commits notifications don't show up on bugs.p.o In-Reply-To: <1487081079.53.0.00639887245621.issue613@psf.upfronthosting.co.za> Message-ID: <1490420502.85.0.538779049583.issue613@psf.upfronthosting.co.za> Nick Coghlan added the comment: Awesome, thank you all! _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Mar 25 09:48:37 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sat, 25 Mar 2017 13:48:37 +0000 Subject: [Tracker-discuss] [issue622] set_roundup_user selects wrong username Message-ID: <1490449717.25.0.913743775518.issue622@psf.upfronthosting.co.za> New submission from Ezio Melotti: A user created https://github.com/python/cpython/pull/809 but the PR got linked with the wrong name: http://bugs.python.org/issue29862 This is because set_roundup_user uses filter() to find matching names, and filter returns all values that contain the given string. In this case the gh username was mandeep, and the wrong name had "harmandeepsingh1" as username. ---------- assignedto: ezio.melotti messages: 3315 nosy: ezio.melotti, maciej.szulik priority: bug status: unread title: set_roundup_user selects wrong username _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Mar 25 09:52:39 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sat, 25 Mar 2017 13:52:39 +0000 Subject: [Tracker-discuss] [issue622] set_roundup_user selects wrong username In-Reply-To: <1490449717.25.0.913743775518.issue622@psf.upfronthosting.co.za> Message-ID: <1490449959.2.0.363912210677.issue622@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch fixes the issue. I couldn't find any method that checks for exact matches, so I kept filter and then checked the GH username manually. There is a lookup method, but IIUC it only works on the "key field", which in this case is the 'username' (not the GH name). I was able to use that to lookup python-dev. The patch also includes tests for the 3 possible scenarios. ---------- status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/roundup/github.py b/roundup/github.py --- a/roundup/github.py +++ b/roundup/github.py @@ -141,13 +141,17 @@ """ github_username = self.get_github_username() user_ids = self.db.user.filter(None, {'github': github_username}) - if not user_ids: - # set bpobot as userid when none is found - user_ids = self.db.user.filter(None, {'username': 'python-dev'}) - if not user_ids: + for user_id in user_ids: + if self.db.user.get(user_id, 'github') == github_username: + break # found the right user id + else: + # set python-dev as user id when none is found + try: + user_id = self.db.user.lookup('python-dev') + except KeyError: # python-dev does not exists, anonymous will be used instead return - username = self.db.user.get(user_ids[0], 'username') + username = self.db.user.get(user_id, 'username') self.db.setCurrentUser(username) def dispatch(self): diff --git a/test/test_github.py b/test/test_github.py --- a/test/test_github.py +++ b/test/test_github.py @@ -173,6 +173,43 @@ status = self.db.pull_request.get(prs[0], 'status') self.assertEqual(status, "open") + def testPullRequestEventForUsername(self): + # Make sure that only a exact github username match + dummy_client = self._make_client("pullrequestevent.txt") + self.db.user.create(username="foo", github="_python") + self.db.user.create(username="bar", github="a_python") + self.db.user.create(username="baz", github="python2") + self.db.user.create(username="expected", github="python") + handler = GitHubHandler(dummy_client) + handler.dispatch() + prs = self.db.issue.get('1', 'pull_requests') + user_id = self.db.pull_request.get(prs[0], 'creator') + self.assertEqual(self.db.user.get(user_id, 'username'), 'expected') + + def testPullRequestEventForUsernameWithNoMatchUsesPythonDev(self): + # Make sure that python-dev is picked if there are no matches + dummy_client = self._make_client("pullrequestevent.txt") + self.db.user.create(username="foo", github="_python") + self.db.user.create(username="bar", github="a_python") + self.db.user.create(username="python-dev", github="python2") + handler = GitHubHandler(dummy_client) + handler.dispatch() + prs = self.db.issue.get('1', 'pull_requests') + user_id = self.db.pull_request.get(prs[0], 'creator') + self.assertEqual(self.db.user.get(user_id, 'username'), 'python-dev') + + def testPullRequestEventForUsernameWithNoMatchUsesAnonymous(self): + # Make sure that anonymous is picked with no match and no python-dev + dummy_client = self._make_client("pullrequestevent.txt") + self.db.user.create(username="foo", github="_python") + self.db.user.create(username="bar", github="a_python") + self.db.user.create(username="baz", github="python2") + handler = GitHubHandler(dummy_client) + handler.dispatch() + prs = self.db.issue.get('1', 'pull_requests') + user_id = self.db.pull_request.get(prs[0], 'creator') + self.assertEqual(self.db.user.get(user_id, 'username'), 'anonymous') + def testPullRequestEventForMultipleIssueReferenceInTitle(self): dummy_client = self._make_client("pullrequestevent3.txt") self.db.issue.create(title="Issue 2") From metatracker at psf.upfronthosting.co.za Sat Mar 25 14:46:43 2017 From: metatracker at psf.upfronthosting.co.za (Anish Shah) Date: Sat, 25 Mar 2017 18:46:43 +0000 Subject: [Tracker-discuss] [issue621] Pull request reopened but the PR still shows closed in bug tracker In-Reply-To: <1490224185.13.0.282607681043.issue621@psf.upfronthosting.co.za> Message-ID: <1490467603.16.0.313862902509.issue621@psf.upfronthosting.co.za> Anish Shah added the comment: Added a patch _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff -r 1da702d3cf41 roundup/github.py --- a/roundup/github.py Sat Mar 25 00:01:07 2017 +0200 +++ b/roundup/github.py Sun Mar 26 00:15:13 2017 +0530 @@ -240,7 +240,7 @@ def handle_action(self, action, prid, title, status, issue_ids): if action in ('opened', 'created'): self.handle_create(prid, title, status, issue_ids) - elif action in ('edited', 'closed'): + elif action in ('edited', 'closed', 'reopened'): self.handle_update(prid, title, status, issue_ids) def get_issue_ids(self): diff -r 1da702d3cf41 test/data/pullrequestreopened.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/pullrequestreopened.txt Sun Mar 26 00:15:13 2017 +0530 @@ -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=24fac1ecaff965d56278cfd69951660b6220e3e1 +Content-Length: 18985 + +{"action":"reopened","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/subscription s","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":"","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":"17 0f8a1f0ffbb733de656cd4a332ecea0c526d53","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":"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/cp ython/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.c om/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","ss h_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/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/us ers/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":"https://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/nu mber}","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"}},"_links":{"self":{"href":"https://api.github.com/repos/python/cpy thon/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":"","ur l":"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":"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}","stat uses_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/cp ython/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_u rl":"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/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/user s/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 -r 1da702d3cf41 test/test_github.py --- a/test/test_github.py Sat Mar 25 00:01:07 2017 +0200 +++ b/test/test_github.py Sun Mar 26 00:15:13 2017 +0530 @@ -336,6 +336,30 @@ status = self.db.pull_request.get(prs[0], 'status') self.assertEqual(status, 'closed') + def testReopenedPullRequest(self): + # When pull request is closed + dummy_client = self._make_client('pullrequestevent.txt') + handler = GitHubHandler(dummy_client) + handler.dispatch() + prs = self.db.issue.get('1', 'pull_requests') + self.assertEqual(len(prs), 1) + number = self.db.pull_request.get(prs[0], 'number') + self.assertEqual(number, '11') + status = self.db.pull_request.get(prs[0], 'status') + self.assertEqual(status, 'open') + self.db.close() + dummy_client = self._make_client('pullrequestclosed.txt') + handler = GitHubHandler(dummy_client) + handler.dispatch() + status = self.db.pull_request.get(prs[0], 'status') + self.assertEqual(status, 'closed') + self.db.close() + dummy_client = self._make_client('pullrequestreopened.txt') + handler = GitHubHandler(dummy_client) + handler.dispatch() + status = self.db.pull_request.get(prs[0], 'status') + self.assertEqual(status, 'open') + def testClosedPullRequestNonASCII(self): # When pull request is closed and the title is non-ASCII dummy_client = self._make_client('pullrequestclosed2.txt') From metatracker at psf.upfronthosting.co.za Mon Mar 27 14:03:09 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 18:03:09 +0000 Subject: [Tracker-discuss] [issue622] set_roundup_user selects wrong username In-Reply-To: <1490449717.25.0.913743775518.issue622@psf.upfronthosting.co.za> Message-ID: <1490637789.05.0.606656417365.issue622@psf.upfronthosting.co.za> Ezio Melotti added the comment: Applied in https://hg.python.org/tracker/roundup/rev/4d5a7f04978f ---------- status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 14:38:03 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 18:38:03 +0000 Subject: [Tracker-discuss] [issue621] Pull request reopened but the PR still shows closed in bug tracker In-Reply-To: <1490224185.13.0.282607681043.issue621@psf.upfronthosting.co.za> Message-ID: <1490639883.59.0.579608231438.issue621@psf.upfronthosting.co.za> Ezio Melotti added the comment: Applied in https://hg.python.org/tracker/roundup/rev/92cf53770045 Thanks for the patch! ---------- assignedto: -> ezio.melotti nosy: +ezio.melotti status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 14:44:59 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 18:44:59 +0000 Subject: [Tracker-discuss] [issue614] Duplicate commit message on branch merge In-Reply-To: <1487395880.4.0.526142839342.issue614@psf.upfronthosting.co.za> Message-ID: <1490640299.85.0.528719548229.issue614@psf.upfronthosting.co.za> Ezio Melotti added the comment: I haven't heard of any similar issues, so the patch should have solved the problem. ---------- status: testing -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 14:47:52 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 18:47:52 +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: <1490640472.28.0.709769343313.issue617@psf.upfronthosting.co.za> Ezio Melotti added the comment: You should report this upstream on http://issues.roundup-tracker.org/ If I understand correctly you want to be able to login by entering username+password or email+password, but currently only username+password is allowed, right? ---------- nosy: +ezio.melotti priority: bug -> feature status: unread -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 14:56:55 2017 From: metatracker at psf.upfronthosting.co.za (Brett C.) Date: Mon, 27 Mar 2017 18:56:55 +0000 Subject: [Tracker-discuss] [issue623] Python modules compatible with Windows 10 In-Reply-To: <1490600511.3.0.240429306239.issue623@psf.upfronthosting.co.za> Message-ID: <1490641015.16.0.715631960943.issue623@psf.upfronthosting.co.za> Brett C. added the comment: This is the wrong place to ask this question as this is an issue tracker for the bugs.python.org website. Regardless, without looking at that spreadsheet, there's no way for us to know what packages do or do not work on Windows 10 if they are hosted on PyPI as that's a per-project decision (e.g. whether they chose to use Windows-only features). But in general, if a module works on Windows 7 it should work on Windows 10. ---------- nosy: +brett.cannon status: unread -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 15:50:42 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 19:50:42 +0000 Subject: [Tracker-discuss] [issue591] Unable to register on bugs.python.org if an homepage is specified In-Reply-To: <1464754461.87.0.614181639598.issue591@psf.upfronthosting.co.za> Message-ID: <1490644242.54.0.565176136616.issue591@psf.upfronthosting.co.za> Ezio Melotti added the comment: The fields (email address, homepage, roles) are validated (by detectors/userauditor.py) only once the user is being created, and that happens while clicking on the confirmation link. I can't think of any simple way to validate them beforehand on the server side, however if you get an error, no user should have been created and you should be able to reregister with the same username and with correct information. ---------- nosy: +ezio.melotti _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 16:12:39 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 20:12:39 +0000 Subject: [Tracker-discuss] [issue591] Unable to register on bugs.python.org if an homepage is specified In-Reply-To: <1464754461.87.0.614181639598.issue591@psf.upfronthosting.co.za> Message-ID: <1490645559.57.0.485422609165.issue591@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also http://issues.roundup-tracker.org/issue2550920 _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Mar 27 19:17:41 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 27 Mar 2017 23:17:41 +0000 Subject: [Tracker-discuss] [issue597] Delete now redundant detectors/changes_xml_writer.py In-Reply-To: <1465628089.25.0.456064542553.issue597@psf.upfronthosting.co.za> Message-ID: <1490656661.21.0.177245523011.issue597@psf.upfronthosting.co.za> Ezio Melotti added the comment: Done in https://hg.python.org/tracker/python-dev/rev/64d04cffeca4 Thanks for the patch! ---------- assignedto: -> ezio.melotti status: unread -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 31 13:05:33 2017 From: metatracker at psf.upfronthosting.co.za (Gregory P Smith) Date: Fri, 31 Mar 2017 17:05:33 +0000 Subject: [Tracker-discuss] [issue624] bpo emails contain useless non-github pull_request number - users want a link to actual github PR Message-ID: <1490979933.98.0.318344152862.issue624@psf.upfronthosting.co.za> New submission from Gregory P Smith: bugs.python.org emails contain misleading text such as """ Changes by so and so ---------- pull_requests: +1081 """ When a Github Pull Request is associated with an issue. Which is *entirely useless* as 1081 is NOT a github PR number. It appears to be an internal bpo database key. Please never expose that! This makes an email based workflow impossible as I cannot go from the email to the Github PR in question. What this needs to be is text containing the actual Github PR number hyperlinked directly to the Github PR itself. In this example, the above was trigged by the "2017-03-31 09:36:35 dstufft set pull_requests: + pull_request1081" action on https://bugs.python.org/issue20572 which should really link to https://github.com/python/cpython/pull/552 if I understand https://bugs.python.org/pull_request1081 properly. Please consider email based workflows. I do not want to open bpo to hunt through the UI for one of two places that may contain the link that eventually gets me to the right page. ---------- messages: 3327 nosy: gregory.p.smith priority: bug status: unread title: bpo emails contain useless non-github pull_request number - users want a link to actual github PR _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Mar 31 13:42:29 2017 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Fri, 31 Mar 2017 17:42:29 +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: <1490982149.57.0.98012789257.issue624@psf.upfronthosting.co.za> Ezio Melotti added the comment: See https://github.com/python/core-workflow/issues/35 ---------- nosy: +ezio.melotti status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________