8000 Merge pull request #136 from rogerhu/issue_url2 · jeffcross/github3.py@6b28752 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b28752

Browse files
committed
Merge pull request sigmavirus24#136 from rogerhu/issue_url2
Add test to changes with issue_url.
2 parents 528dfaa + c19b103 commit 6b28752

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/json/pull_request

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"deletions": 1, "merge_commit_sha": null, "additions": 1, "number": 135, "assignee": null, "mergeable": null, "closed_at": null, "body_html": "", "id": 8158269, "title": "When issuing pull requests, pull requests seem to have /pull/ as the issue_url. Allow both types to appear.", "body_text": "", "comments": 0, "merged_at": null, "state": "open", "_links": {"self": {"href": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/135"}, "html": {"href": "https://github.com/sigmavirus24/github3.py/pull/135"}, "issue": {"href": "https://api.github.com/repos/sigmavirus24/github3.py/issues/135"}, "review_comments": {"href": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/135/comments"}, "comments": {"href": "https://api.github.com/repos/sigmavirus24/github3.py/issues/135/comments"}}, "changed_files": 1, "diff_url": "https://github.com/sigmavirus24/github3.py/pull/135.diff", "issue_url": "https://github.com/sigmavirus24/github3.py/pull/135", "body": "", "head": {"repo": {"issues_url": "https://api.github.com/repos/rogerhu/github3.py/issues{/number}", "has_wiki": false, "forks_url": "https://api.github.com/repos/rogerhu/github3.py/forks", "mirror_url": null, "subscription_url": "https://api.github.com/repos/rogerhu/github3.py/subscription", "notifications_url": "https://api.github.com/repos/rogerhu/github3.py/notifications{?since,all,participating}", "collaborators_url": "https://api.github.com/repos/rogerhu/github3.py/collaborators{/collaborator}", "updated_at": "2013-09-07T17:01:28Z", "private": false, "pulls_url": "https://api.github.com/repos/rogerhu/github3.py/pulls{/number}", "issue_comment_url": "https://api.github.com/repos/rogerhu/github3.py/issues/comments/{number}", "labels_url": "https://api.github.com/repos/rogerhu/github3.py/labels{/name}", "full_name": "rogerhu/github3.py", "owner": {"following_url": "https://api.github.com/users/rogerhu/following{/other_user}", "events_url": "https://api.github.com/users/rogerhu/events{/privacy}", "organizations_url": "https://api.github.com/users/rogerhu/orgs", "url": "https://api.github.com/users/rogerhu", "gists_url": "https://api.github.com/users/rogerhu/gists{/gist_id}", "html_url": "https://github.com/rogerhu", "subscriptions_url": "https://api.github.com/users/rogerhu/subscriptions", "avatar_url": "https://1.gravatar.com/avatar/30a32a2cf564458fe92cc81e50b74644?d=https%3A%2F%2Fidenticons.github.com%2F275b2d83d2c37c1397d4197ce41539e2.png", "repos_url": "https://api.github.com/users/rogerhu/repos", "received_events_url": "https://api.github.com/users/rogerhu/received_events", "gravatar_id": "30a32a2cf564458fe92cc81e50b74644", "starred_url": "https://api.github.com/users/rogerhu/starred{/owner}{/repo}", "login": "rogerhu", "type": "User", "id": 326857, "followers_url": "https://api.github.com/users/rogerhu/followers"}, "statuses_url": "https://api.github.com/repos/rogerhu/github3.py/statuses/{sha}", "id": 12661943, "keys_url": "https://api.github.com/repos/rogerhu/github3.py/keys{/key_id}", "description": "Python library for interfacing with the GitHub APIv3", "tags_url": "https://api.github.com/repos/rogerhu/github3.py/tags", "downloads_url": "https://api.github.com/repos/rogerhu/github3.py/downloads", "assignees_url": "https://api.github.com/repos/rogerhu/github3.py/assignees{/user}", "contents_url": "https://api.github.com/repos/rogerhu/github3.py/contents/{+path}", "git_refs_url": "https://api.github.com/repos/rogerhu/github3.py/git/refs{/sha}", "open_issues_count": 0, "clone_url": "https://github.com/rogerhu/github3.py.git", "watchers_count": 0, "git_tags_url": "https://api.github.com/repos/rogerhu/github3.py/git/tags{/sha}", "milestones_url": "https://api.github.com/repos/rogerhu/github3.py/milestones{/number}", "languages_url": "https://api.github.com/repos/rogerhu/github3.py/languages", "size": 100, "homepage": "http://github3py.readthedocs.org/", "fork": true, "commits_url": "https://api.github.com/repos/rogerhu/github3.py/commits{/sha}", "issue_events_url": "https://api.github.com/repos/rogerhu/github3.py/issues/events{/number}", "archive_url": "https://api.github.com/repos/rogerhu/github3.py/{archive_format}{/ref}", "comments_url": "https://api.github.com/repos/rogerhu/github3.py/comments{/number}", "events_url": "https://api.github.com/repos/rogerhu/github3.py/events", "contributors_url": "https://api.github.com/repos/rogerhu/github3.py/contributors", "html_url": "https://github.com/rogerhu/github3.py", "forks": 0, "compare_url": "https://api.github.com/repos/rogerhu/github3.py/compare/{base}...{head}", "open_issues": 0, "git_url": "git://github.com/rogerhu/github3.py.git", "svn_url": "https://github.com/rogerhu/github3.py", "merges_url": "https://api.github.com/repos/rogerhu/github3.py/merges", "has_issues": false, "ssh_url": "git@github.com:rogerhu/github3.py.git", "blobs_url": "https://api.github.com/repos/rogerhu/github3.py/git/blobs{/sha}", "master_branch": "develop", "git_commits_url": "https://api.github.com/repos/rogerhu/github3.py/git/commits{/sha}", "hooks_url": "https://api.github.com/repos/rogerhu/github3.py/hooks", "has_downloads": true, "watchers": 0, "name": "github3.py", "language": "Python", "url": "https://api.github.com/repos/rogerhu/github3.py", "created_at": "2013-09-07T08:16:02Z", "pushed_at": "2013-09-07T17:01:23Z", "forks_count": 0, "default_branch": "develop", "teams_url": "https://api.github.com/repos/rogerhu/github3.py/teams", "trees_url": "https://api.github.com/repos/rogerhu/github3.py/git/trees{/sha}", "branches_url": "https://api.github.com/repos/rogerhu/github3.py/branches{/branch}", "subscribers_url": "https://api.github.com/repos/rogerhu/github3.py/subscribers", "stargazers_url": "https://api.github.com/repos/rogerhu/github3.py/stargazers"}, "sha": "466ae5c400ef7438a94e8bcbc6adb0b9b67af9d1", "ref": "issue_url2", "user": {"following_url": "https://api.github.com/users/rogerhu/following{/other_user}", "events_url": "https://api.github.com/users/rogerhu/events{/privacy}", "organizations_url": "https://api.github.com/users/rogerhu/orgs", "url": "https://api.github.com/users/rogerhu", "gists_url": "https://api.github.com/users/rogerhu/gists{/gist_id}", "html_url": "https://github.com/rogerhu", "subscriptions_url": "https://api.github.com/users/rogerhu/subscriptions", "avatar_url": "https://1.gravatar.com/avatar/30a32a2cf564458fe92cc81e50b74644?d=https%3A%2F%2Fidenticons.github.com%2F275b2d83d2c37c1397d4197ce41539e2.png", "repos_url": "https://api.github.com/users/rogerhu/repos", "received_events_url": "https://api.github.com/users/rogerhu/received_events", "gravatar_id": "30a32a2cf564458fe92cc81e50b74644", "starred_url": "https://api.github.com/users/rogerhu/starred{/owner}{/repo}", "login": "rogerhu", "type": "User", "id": 326857, "followers_url": "https://api.github.com/users/rogerhu/followers"}, "label": "rogerhu:issue_url2"}, "commits_url": "https://github.com/sigmavirus24/github3.py/pull/135/commits", "commits": 1, "comments_url": "https://api.github.com/repos/sigmavirus24/github3.py/issues/135/comments", "html_url": "https://github.com/sigmavirus24/github3.py/pull/135", "updated_at": "2013-09-07T17:01:28Z", "base": {"repo": {"issues_url": "https://api.github.com/repos/sigmavirus24/github3.py/issues{/number}", "has_wiki": false, "forks_url": "https://api.github.com/repos/sigmavirus24/github3.py/forks", "mirror_url": null, "subscription_url": "https://api.github.com/repos/sigmavirus24/github3.py/subscription", "notifications_url": "https://api.github.com/repos/sigmavirus24/github3.py/notifications{?since,all,participating}", "collaborators_url": "https://api.github.com/repos/sigmavirus24/github3.py/collaborators{/collaborator}", "updated_at": "2013-09-07T16:48:33Z", "private": false, "pulls_url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls{/number}", "issue_comment_url": "https://api.github.com/repos/sigmavirus24/github3.py/issues/comments/{number}", "labels_url": "https://api.github.com/repos/sigmavirus24/github3.py/labels{/name}", "full_name": "sigmavirus24/github3.py", "owner": {"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "url": "https://api.github.com/users/sigmavirus24", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "html_url": "https://github.com/sigmavirus24", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "avatar_url": "https://2.gravatar.com/avatar/c148356d89f925e692178bee1d93acf7?d=https%3A%2F%2Fidenticons.github.com%2F4a71764034cdae877484be72718ba526.png", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "gravatar_id": "c148356d89f925e692178bee1d93acf7", "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "login": "sigmavirus24", "type": "User", "id": 240830, "followers_url": "https://api.github.com/users/sigmavirus24/followers"}, "statuses_url": "https://api.github.com/repos/sigmavirus24/github3.py/statuses/{sha}", "id": 3710711, "keys_url": "https://api.github.com/repos/sigmavirus24/github3.py/keys{/key_id}", "description": "Python library for interfacing with the GitHub APIv3", "tags_url": "https://api.github.com/repos/sigmavirus24/github3.py/tags", "downloads_url": "https://api.github.com/repos/sigmavirus24/github3.py/downloads", "assignees_url": "https://api.github.com/repos/sigmavirus24/github3.py/assignees{/user}", "contents_url": "https://api.github.com/repos/sigmavirus24/github3.py/contents/{+path}", "git_refs_url": "https://api.github.com/repos/sigmavirus24/github3.py/git/refs{/sha}", "open_issues_count": 14, "clone_url": "https://github.com/sigmavirus24/github3.py.git", "watchers_count": 117, "git_tags_url": "https://api.github.com/repos/sigmavirus24/github3.py/git/tags{/sha}", "milestones_url": "https://api.github.com/repos/sigmavirus24/github3.py/milestones{/number}", "languages_url": "https://api.github.com/repos/sigmavirus24/github3.py/languages", "size": 1000, "homepage": "http://github3py.readthedocs.org/", "fork": false, "commits_url": "https://api.github.com/repos/sigmavirus24/github3.py/commits{/sha}", "issue_events_url": "https://api.github.com/repos/sigmavirus24/github3.py/issues/events{/number}", "archive_url": "https://api.github.com/repos/sigmavirus24/github3.py/{archive_format}{/ref}", "comments_url": "https://api.github.com/repos/sigmavirus24/github3.py/comments{/number}", "events_url": "https://api.github.com/repos/sigmavirus24/github3.py/events", "contributors_url": "https://api.github.com/repos/sigmavirus24/github3.py/contributors", "html_url": "https://github.com/sigmavirus24/github3.py", "forks": 35, "compare_url": "https://api.github.com/repos/sigmavirus24/github3.py/compare/{base}...{head}", "open_issues": 14, "git_url": "git://github.com/sigmavirus24/github3.py.git", "svn_url": "https://github.com/sigmavirus24/github3.py", "merges_url": "https://api.github.com/repos/sigmavirus24/github3.py/merges", "has_issues": true, "ssh_url": "git@github.com:sigmavirus24/github3.py.git", "blobs_url": "https://api.github.com/repos/sigmavirus24/github3.py/git/blobs{/sha}", "master_branch": "develop", "git_commits_url": "https://api.github.com/repos/sigmavirus24/github3.py/git/commits{/sha}", "hooks_url": "https://api.github.com/repos/sigmavirus24/github3.py/hooks", "has_downloads": true, "watchers": 117, "name": "github3.py", "language": "Python", "url": "https://api.github.com/repos/sigmavirus24/github3.py", "created_at": "2012-03-13T19:58:53Z", "pushed_at": "2013-09-07T16:48:33Z", "forks_count": 35, "default_branch": "develop", "teams_url": "https://api.github.com/repos/sigmavirus24/github3.py/teams", "trees_url": "https://api.github.com/repos/sigmavirus24/github3.py/git/trees{/sha}", "branches_url": "https://api.github.com/repos/sigmavirus24/github3.py/branches{/branch}", "subscribers_url": "https://api.github.com/repos/sigmavirus24/github3.py/subscribers", "stargazers_url": "https://api.github.com/repos/sigmavirus24/github3.py/stargazers"}, "sha": "818f136005589c4cb957f41b461142a896ccc7d7", "ref": "develop", "user": {"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "url": "https://api.github.com/users/sigmavirus24", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "html_url": "https://github.com/sigmavirus24", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "avatar_url": "https://2.gravatar.com/avatar/c148356d89f925e692178bee1d93acf7?d=https%3A%2F%2Fidenticons.github.com%2F4a71764034cdae877484be72718ba526.png", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "gravatar_id": "c148356d89f925e692178bee1d93acf7", "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "login": "sigmavirus24", "type": "User", "id": 240830, "followers_url": "https://api.github.com/users/sigmavirus24/followers"}, "label": "sigmavirus24:develop"}, "user": {"following_url": "https://api.github.com/users/rogerhu/following{/other_user}", "events_url": "https://api.github.com/users/rogerhu/events{/privacy}", "organizations_url": "https://api.github.com/users/rogerhu/orgs", "url": "https://api.github.com/users/rogerhu", "gists_url": "https://api.github.com/users/rogerhu/gists{/gist_id}", "html_url": "https://github.com/rogerhu", "subscriptions_url": "https://api.github.com/users/rogerhu/subscriptions", "avatar_url": "https://1.gravatar.com/avatar/30a32a2cf564458fe92cc81e50b74644?d=https%3A%2F%2Fidenticons.github.com%2F275b2d83d2c37c1397d4197ce41539e2.png", "repos_url": "https://api.github.com/users/rogerhu/repos", "received_events_url": "https://api.github.com/users/rogerhu/received_events", "gravatar_id": "30a32a2cf564458fe92cc81e50b74644", "starred_url": "https://api.github.com/users/rogerhu/starred{/owner}{/repo}", "login": "rogerhu", "type": "User", "id": 326857, "followers_url": "https://api.github.com/users/rogerhu/followers"}, "milestone": null, "merged_by": null, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/135", "mergeable_state": "unknown", "created_at": "2013-09-07T17:01:28Z", "merged": false, "review_comments_url": "https://github.com/sigmavirus24/github3.py/pull/135/comments", "review_comments": 0, "review_comment_url": "/repos/sigmavirus24/github3.py/pulls/comments/{number}", "patch_url": "https://github.com/sigmavirus24/github3.py/pull/135.patch"}

tests/test_pulls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,7 @@ def test_update(self):
146146

147147
def test_enterprise(self):
148148
github3.pulls.PullRequest(load('pull_enterprise'))
149+
150+
def test_pull_request_issues(self):
151+
pr = github3.pulls.PullRequest(load('pull_request'))
152+
self.assertTrue(pr.issue_url, 'https://github.com/sigmavirus24/github3.py/pull/135')

0 commit comments

Comments
 (0)
0