{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/40350434","id":40350434,"diff_hunk":"@@ -62,6 +63,24 @@ def make_release_notes(gh, repo, ref, plaintext):\n                 print (\"ERROR: http://github.com/ceph/ceph/pull/\" + str(number) + \" has no associated issue\")\n                 continue    \n \n+            if original_issue:\n+                r = requests.get(tracker_uri.format(issue),params={\"include\":\"relations\"})\n+\n+                # Verify that we are indeed looking at a backports issue\n+                if r.json()[\"issue\"][\"tracker\"][\"name\"] != \"Backport\":\n+                    continue\n+\n+                # Now we can get an original issue only if the\n+                # relations field is populated, otherwise we fallback\n+                # to the tracker number\n+                try:\n+                    relations = r.json()[\"issue\"][\"relations\"]\n+                except KeyError:\n+                    continue","path":"src/script/ceph-release-notes","position":46,"original_position":46,"commit_id":"5e2c66557e4efe1e6ecbb21adbfa4612f2240fd6","original_commit_id":"5e2c66557e4efe1e6ecbb21adbfa4612f2240fd6","user":{"login":"theanalyst","id":1433152,"avatar_url":"https://avatars.githubusercontent.com/u/1433152?v=3","gravatar_id":"","url":"https://api.github.com/users/theanalyst","html_url":"https://github.com/theanalyst","followers_url":"https://api.github.com/users/theanalyst/followers","following_url":"https://api.github.com/users/theanalyst/following{/other_user}","gists_url":"https://api.github.com/users/theanalyst/gists{/gist_id}","starred_url":"https://api.github.com/users/theanalyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theanalyst/subscriptions","organizations_url":"https://api.github.com/users/theanalyst/orgs","repos_url":"https://api.github.com/users/theanalyst/repos","events_url":"https://api.github.com/users/theanalyst/events{/privacy}","received_events_url":"https://api.github.com/users/theanalyst/received_events","type":"User","site_admin":false},"body":"This should break only the `if original issue` so we should be ok I guess?","created_at":"2015-09-24T18:00:37Z","updated_at":"2015-09-24T18:00:37Z","html_url":"https://github.com/ceph/ceph/pull/6009#discussion_r40350434","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/6009","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/40350434"},"html":{"href":"https://github.com/ceph/ceph/pull/6009#discussion_r40350434"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6009"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/6009","id":45573830,"html_url":"https://github.com/ceph/ceph/pull/6009","diff_url":"https://github.com/ceph/ceph/pull/6009.diff","patch_url":"https://github.com/ceph/ceph/pull/6009.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/6009","number":6009,"state":"open","locked":false,"title":"scripts: release_notes can track original issue","user":{"login":"theanalyst","id":1433152,"avatar_url":"https://avatars.githubusercontent.com/u/1433152?v=3","gravatar_id":"","url":"https://api.github.com/users/theanalyst","html_url":"https://github.com/theanalyst","followers_url":"https://api.github.com/users/theanalyst/followers","following_url":"https://api.github.com/users/theanalyst/following{/other_user}","gists_url":"https://api.github.com/users/theanalyst/gists{/gist_id}","starred_url":"https://api.github.com/users/theanalyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theanalyst/subscriptions","organizations_url":"https://api.github.com/users/theanalyst/orgs","repos_url":"https://api.github.com/users/theanalyst/repos","events_url":"https://api.github.com/users/theanalyst/events{/privacy}","received_events_url":"https://api.github.com/users/theanalyst/received_events","type":"User","site_admin":false},"body":"ceph_release_notes helper now has `--original-issue` and\r\n`--no-original-issue` (default) flags added. This is useful\r\nin backport tracker as the original upstream issue generally tends to be\r\nmore informative than the backport issue reference number in the release\r\nnotes. Since turning on this flag adds the additional network query of\r\nredmine tracker for each issue, it is turned off by default\r\n\r\nSigned-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>","created_at":"2015-09-21T17:04:42Z","updated_at":"2015-09-24T18:00:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f7d84ceb711576af812de04c265f1b062e06bd1","assignee":{"login":"dachary","id":433594,"avatar_url":"https://avatars.githubusercontent.com/u/433594?v=3","gravatar_id":"","url":"https://api.github.com/users/dachary","html_url":"https://github.com/dachary","followers_url":"https://api.github.com/users/dachary/followers","following_url":"https://api.github.com/users/dachary/following{/other_user}","gists_url":"https://api.github.com/users/dachary/gists{/gist_id}","starred_url":"https://api.github.com/users/dachary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dachary/subscriptions","organizations_url":"https://api.github.com/users/dachary/orgs","repos_url":"https://api.github.com/users/dachary/repos","events_url":"https://api.github.com/users/dachary/events{/privacy}","received_events_url":"https://api.github.com/users/dachary/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/6009/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/6009/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/6009/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/5e2c66557e4efe1e6ecbb21adbfa4612f2240fd6","head":{"label":"theanalyst:scripts/orig-issue","ref":"scripts/orig-issue","sha":"5e2c66557e4efe1e6ecbb21adbfa4612f2240fd6","user":{"login":"theanalyst","id":1433152,"avatar_url":"https://avatars.githubusercontent.com/u/1433152?v=3","gravatar_id":"","url":"https://api.github.com/users/theanalyst","html_url":"https://github.com/theanalyst","followers_url":"https://api.github.com/users/theanalyst/followers","following_url":"https://api.github.com/users/theanalyst/following{/other_user}","gists_url":"https://api.github.com/users/theanalyst/gists{/gist_id}","starred_url":"https://api.github.com/users/theanalyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theanalyst/subscriptions","organizations_url":"https://api.github.com/users/theanalyst/orgs","repos_url":"https://api.github.com/users/theanalyst/repos","events_url":"https://api.github.com/users/theanalyst/events{/privacy}","received_events_url":"https://api.github.com/users/theanalyst/received_events","type":"User","site_admin":false},"repo":{"id":21639729,"name":"ceph","full_name":"theanalyst/ceph","owner":{"login":"theanalyst","id":1433152,"avatar_url":"https://avatars.githubusercontent.com/u/1433152?v=3","gravatar_id":"","url":"https://api.github.com/users/theanalyst","html_url":"https://github.com/theanalyst","followers_url":"https://api.github.com/users/theanalyst/followers","following_url":"https://api.github.com/users/theanalyst/following{/other_user}","gists_url":"https://api.github.com/users/theanalyst/gists{/gist_id}","starred_url":"https://api.github.com/users/theanalyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theanalyst/subscriptions","organizations_url":"https://api.github.com/users/theanalyst/orgs","repos_url":"https://api.github.com/users/theanalyst/repos","events_url":"https://api.github.com/users/theanalyst/events{/privacy}","received_events_url":"https://api.github.com/users/theanalyst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/theanalyst/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/theanalyst/ceph","forks_url":"https://api.github.com/repos/theanalyst/ceph/forks","keys_url":"https://api.github.com/repos/theanalyst/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theanalyst/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theanalyst/ceph/teams","hooks_url":"https://api.github.com/repos/theanalyst/ceph/hooks","issue_events_url":"https://api.github.com/repos/theanalyst/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/theanalyst/ceph/events","assignees_url":"https://api.github.com/repos/theanalyst/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/theanalyst/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/theanalyst/ceph/tags","blobs_url":"https://api.github.com/repos/theanalyst/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theanalyst/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theanalyst/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/theanalyst/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theanalyst/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/theanalyst/ceph/languages","stargazers_url":"https://api.github.com/repos/theanalyst/ceph/stargazers","contributors_url":"https://api.github.com/repos/theanalyst/ceph/contributors","subscribers_url":"https://api.github.com/repos/theanalyst/ceph/subscribers","subscription_url":"https://api.github.com/repos/theanalyst/ceph/subscription","commits_url":"https://api.github.com/repos/theanalyst/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/theanalyst/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/theanalyst/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/theanalyst/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/theanalyst/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/theanalyst/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theanalyst/ceph/merges","archive_url":"https://api.github.com/repos/theanalyst/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theanalyst/ceph/downloads","issues_url":"https://api.github.com/repos/theanalyst/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/theanalyst/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/theanalyst/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/theanalyst/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theanalyst/ceph/labels{/name}","releases_url":"https://api.github.com/repos/theanalyst/ceph/releases{/id}","created_at":"2014-07-09T04:45:38Z","updated_at":"2014-12-11T13:56:12Z","pushed_at":"2015-09-21T18:08:59Z","git_url":"git://github.com/theanalyst/ceph.git","ssh_url":"git@github.com:theanalyst/ceph.git","clone_url":"https://github.com/theanalyst/ceph.git","svn_url":"https://github.com/theanalyst/ceph","homepage":"http://ceph.com","size":131577,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"7bb316fbc838334973eb0ec5ced4afac03744e08","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","created_at":"2011-09-01T21:41:26Z","updated_at":"2015-09-24T17:29:23Z","pushed_at":"2015-09-24T16:55:12Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":515355,"stargazers_count":1555,"watchers_count":1555,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":915,"mirror_url":null,"open_issues_count":237,"forks":915,"open_issues":237,"watchers":1555,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6009"},"html":{"href":"https://github.com/ceph/ceph/pull/6009"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/6009"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/6009/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6009/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6009/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/5e2c66557e4efe1e6ecbb21adbfa4612f2240fd6"}}}}