From 678b6b20067eff0884d3b3d67e993378f8be14c9 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 17 Apr 2018 12:21:26 +1000 Subject: [PATCH] PullRequest labels should use Issues URL (#754) The Github API docs for PullRequests say to make use of the Issues API to add, remove, set and query labels. This means that we need to make use of the issue_url property for the PullRequest, not its own URL. --- github/PullRequest.py | 20 +++++++++---------- github/tests/PullRequest.py | 2 +- github/tests/ReplayData/PullRequest.setUp.txt | 2 +- .../PullRequest.testAddAndRemoveLabels.txt | 14 ++++++------- ...tAddAndRemoveLabelsWithStringArguments.txt | 14 ++++++------- .../PullRequest.testDeleteAndSetLabels.txt | 10 +++++----- ...tDeleteAndSetLabelsWithStringArguments.txt | 10 +++++----- .../ReplayData/PullRequest.testGetLabels.txt | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/github/PullRequest.py b/github/PullRequest.py index ec86eab5..f92e7d05 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -619,19 +619,19 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:owner/:repo/pulls/:number/labels `_ + :calls: `GET /repos/:owner/:repo/issues/:number/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( github.Label.Label, self._requester, - self.url + "/labels", + self.issue_url + "/labels", None ) def add_to_labels(self, *labels): """ - :calls: `POST /repos/:owner/:repo/pulls/:number/labels `_ + :calls: `POST /repos/:owner/:repo/issues/:number/labels `_ :param label: :class:`github.Label.Label` or string :rtype: None """ @@ -639,23 +639,23 @@ class PullRequest(github.GithubObject.CompletableGithubObject): post_parameters = [label.name if isinstance(label, github.Label.Label) else label for label in labels] headers, data = self._requester.requestJsonAndCheck( "POST", - self.url + "/labels", + self.issue_url + "/labels", input=post_parameters ) def delete_labels(self): """ - :calls: `DELETE /repos/:owner/:repo/pulls/:number/labels `_ + :calls: `DELETE /repos/:owner/:repo/issues/:number/labels `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( "DELETE", - self.url + "/labels" + self.issue_url + "/labels" ) def remove_from_labels(self, label): """ - :calls: `DELETE /repos/:owner/:repo/pulls/:number/labels/:name `_ + :calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name `_ :param label: :class:`github.Label.Label` or string :rtype: None """ @@ -666,12 +666,12 @@ class PullRequest(github.GithubObject.CompletableGithubObject): label = urllib.quote(label) headers, data = self._requester.requestJsonAndCheck( "DELETE", - self.url + "/labels/" + label + self.issue_url + "/labels/" + label ) def set_labels(self, *labels): """ - :calls: `PUT /repos/:owner/:repo/pulls/:number/labels `_ + :calls: `PUT /repos/:owner/:repo/issues/:number/labels `_ :param label: :class:`github.Label.Label` :rtype: None """ @@ -679,7 +679,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): post_parameters = [label.name if isinstance(label, github.Label.Label) else label for label in labels] headers, data = self._requester.requestJsonAndCheck( "PUT", - self.url + "/labels", + self.issue_url + "/labels", input=post_parameters ) diff --git a/github/tests/PullRequest.py b/github/tests/PullRequest.py index 52f96879..b7b0fd5c 100644 --- a/github/tests/PullRequest.py +++ b/github/tests/PullRequest.py @@ -61,7 +61,7 @@ class PullRequest(Framework.TestCase): self.assertEqual(self.pull.head.label, "BeaverSoftware:master") self.assertEqual(self.pull.html_url, "https://github.com/jacquev6/PyGithub/pull/31") self.assertEqual(self.pull.id, 1436215) - self.assertEqual(self.pull.issue_url, "https://github.com/jacquev6/PyGithub/issues/31") + self.assertEqual(self.pull.issue_url, "https://api.github.com/repos/jacquev6/PyGithub/issues/31") self.assertListKeyEqual(self.pull.labels, lambda a: a.name, ["refactoring"]) self.assertFalse(self.pull.mergeable) self.assertTrue(self.pull.merged) diff --git a/github/tests/ReplayData/PullRequest.setUp.txt b/github/tests/ReplayData/PullRequest.setUp.txt index c387ee14..4734fa1c 100644 --- a/github/tests/ReplayData/PullRequest.setUp.txt +++ b/github/tests/ReplayData/PullRequest.setUp.txt @@ -29,5 +29,5 @@ None None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4985'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '4182'), ('server', 'nginx'), ('last-modified', 'Sat, 03 Nov 2012 08:19:40 GMT'), ('connection', 'keep-alive'), ('etag', '"1ec7d9f2ebb27db7dc002f1382d23975"'), ('cache-control', 'private, s-maxage=60, max-age=60'), ('date', 'Sat, 03 Nov 2012 08:19:46 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"additions":511,"deletions":384,"merged_at":"2012-05-27T10:29:07Z","base":{"label":"jacquev6:topic/RewriteWithGeneratedCode","repo":{"watchers":97,"pushed_at":"2012-11-03T08:07:38Z","watchers_count":97,"forks":27,"open_issues":12,"mirror_url":null,"description":"Python library implementing the full Github API v3","owner":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"open_issues_count":12,"url":"https://api.github.com/repos/jacquev6/PyGithub","updated_at":"2012-11-03T08:07:40Z","html_url":"https://github.com/jacquev6/PyGithub","clone_url":"https://github.com/jacquev6/PyGithub.git","language":"Python","has_downloads":true,"ssh_url":"git@github.com:jacquev6/PyGithub.git","size":256,"forks_count":27,"fork":false,"full_name":"jacquev6/PyGithub","name":"PyGithub","created_at":"2012-02-25T12:53:47Z","git_url":"git://github.com/jacquev6/PyGithub.git","svn_url":"https://github.com/jacquev6/PyGithub","homepage":"http://vincent-jacques.net/PyGithub","has_wiki":true,"private":false,"id":3544490,"has_issues":true},"sha":"ed866fc43833802ab553e5ff8581c81bb00dd433","ref":"topic/RewriteWithGeneratedCode","user":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146}},"review_comments":1,"changed_files":45,"merge_commit_sha":"28ae6dd10ebccd5eaf8db8dacb5b699ee7f4a663","closed_at":"2012-05-27T10:29:07Z","number":31,"issue_url":"https://github.com/jacquev6/PyGithub/issues/31","url":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31","milestone":null,"updated_at":"2012-11-03T08:19:40Z","patch_url":"https://github.com/jacquev6/PyGithub/pull/31.patch","html_url":"https://github.com/jacquev6/PyGithub/pull/31","merged_by":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"commits":3,"state":"closed","mergeable":false,"_links":{"review_comments":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31/comments"},"html":{"href":"https://github.com/jacquev6/PyGithub/pull/31"},"self":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31"},"issue":{"href":"https://api.github.com/repos/jacquev6/PyGithub/issues/31"},"comments":{"href":"https://api.github.com/repos/jacquev6/PyGithub/issues/31/comments"}},"head":{"label":"BeaverSoftware:master","repo":null,"sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","ref":"master","user":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","login":"BeaverSoftware","id":1424031}},"assignee":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"assignees":[{"url":"https://api.github.com/users/stuglaser","gravatar_id":"","avatar_url":"https://avatars.githubusercontent.com/u/1527117?v=3","login":"stuglaser","id":1527117},{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146}],"diff_url":"https://github.com/jacquev6/PyGithub/pull/31.diff","comments":1,"created_at":"2012-05-27T09:25:36Z","id":1436215,"merged":true,"mergeable_state":"dirty","body":"Body edited by PyGithub","user":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"title":"Title edited by PyGithub","labels":[{"id":264033039,"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/refactoring","name":"refactoring","color":"eb6420","default":false}]} +{"additions":511,"deletions":384,"merged_at":"2012-05-27T10:29:07Z","base":{"label":"jacquev6:topic/RewriteWithGeneratedCode","repo":{"watchers":97,"pushed_at":"2012-11-03T08:07:38Z","watchers_count":97,"forks":27,"open_issues":12,"mirror_url":null,"description":"Python library implementing the full Github API v3","owner":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"open_issues_count":12,"url":"https://api.github.com/repos/jacquev6/PyGithub","updated_at":"2012-11-03T08:07:40Z","html_url":"https://github.com/jacquev6/PyGithub","clone_url":"https://github.com/jacquev6/PyGithub.git","language":"Python","has_downloads":true,"ssh_url":"git@github.com:jacquev6/PyGithub.git","size":256,"forks_count":27,"fork":false,"full_name":"jacquev6/PyGithub","name":"PyGithub","created_at":"2012-02-25T12:53:47Z","git_url":"git://github.com/jacquev6/PyGithub.git","svn_url":"https://github.com/jacquev6/PyGithub","homepage":"http://vincent-jacques.net/PyGithub","has_wiki":true,"private":false,"id":3544490,"has_issues":true},"sha":"ed866fc43833802ab553e5ff8581c81bb00dd433","ref":"topic/RewriteWithGeneratedCode","user":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146}},"review_comments":1,"changed_files":45,"merge_commit_sha":"28ae6dd10ebccd5eaf8db8dacb5b699ee7f4a663","closed_at":"2012-05-27T10:29:07Z","number":31,"issue_url":"https://api.github.com/repos/jacquev6/PyGithub/issues/31","url":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31","milestone":null,"updated_at":"2012-11-03T08:19:40Z","patch_url":"https://github.com/jacquev6/PyGithub/pull/31.patch","html_url":"https://github.com/jacquev6/PyGithub/pull/31","merged_by":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"commits":3,"state":"closed","mergeable":false,"_links":{"review_comments":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31/comments"},"html":{"href":"https://github.com/jacquev6/PyGithub/pull/31"},"self":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31"},"issue":{"href":"https://api.github.com/repos/jacquev6/PyGithub/issues/31"},"comments":{"href":"https://api.github.com/repos/jacquev6/PyGithub/issues/31/comments"}},"head":{"label":"BeaverSoftware:master","repo":null,"sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","ref":"master","user":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","login":"BeaverSoftware","id":1424031}},"assignee":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"assignees":[{"url":"https://api.github.com/users/stuglaser","gravatar_id":"","avatar_url":"https://avatars.githubusercontent.com/u/1527117?v=3","login":"stuglaser","id":1527117},{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146}],"diff_url":"https://github.com/jacquev6/PyGithub/pull/31.diff","comments":1,"created_at":"2012-05-27T09:25:36Z","id":1436215,"merged":true,"mergeable_state":"dirty","body":"Body edited by PyGithub","user":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","login":"jacquev6","id":327146},"title":"Title edited by PyGithub","labels":[{"id":264033039,"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/refactoring","name":"refactoring","color":"eb6420","default":false}]} diff --git a/github/tests/ReplayData/PullRequest.testAddAndRemoveLabels.txt b/github/tests/ReplayData/PullRequest.testAddAndRemoveLabels.txt index 6e33613b..a9b5bfcf 100644 --- a/github/tests/ReplayData/PullRequest.testAddAndRemoveLabels.txt +++ b/github/tests/ReplayData/PullRequest.testAddAndRemoveLabels.txt @@ -24,7 +24,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -35,7 +35,7 @@ https DELETE api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels/wip +/repos/jacquev6/PyGithub/issues/31/labels/wip {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -46,7 +46,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -57,7 +57,7 @@ https DELETE api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels/refactoring +/repos/jacquev6/PyGithub/issues/31/labels/refactoring {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -68,7 +68,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -79,7 +79,7 @@ https POST api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} ["wip", "refactoring"] 200 @@ -90,7 +90,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 diff --git a/github/tests/ReplayData/PullRequest.testAddAndRemoveLabelsWithStringArguments.txt b/github/tests/ReplayData/PullRequest.testAddAndRemoveLabelsWithStringArguments.txt index 6f5b7d8c..0ab58677 100644 --- a/github/tests/ReplayData/PullRequest.testAddAndRemoveLabelsWithStringArguments.txt +++ b/github/tests/ReplayData/PullRequest.testAddAndRemoveLabelsWithStringArguments.txt @@ -2,7 +2,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -13,7 +13,7 @@ https DELETE api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels/wip +/repos/jacquev6/PyGithub/issues/31/labels/wip {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -24,7 +24,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -35,7 +35,7 @@ https DELETE api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels/refactoring +/repos/jacquev6/PyGithub/issues/31/labels/refactoring {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -46,7 +46,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -57,7 +57,7 @@ https POST api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} ["wip", "refactoring"] 200 @@ -68,7 +68,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 diff --git a/github/tests/ReplayData/PullRequest.testDeleteAndSetLabels.txt b/github/tests/ReplayData/PullRequest.testDeleteAndSetLabels.txt index 18136654..cd1d9818 100644 --- a/github/tests/ReplayData/PullRequest.testDeleteAndSetLabels.txt +++ b/github/tests/ReplayData/PullRequest.testDeleteAndSetLabels.txt @@ -24,7 +24,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -35,7 +35,7 @@ https DELETE api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 204 @@ -46,7 +46,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -57,7 +57,7 @@ https PUT api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} ["wip", "refactoring"] 200 @@ -68,7 +68,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 diff --git a/github/tests/ReplayData/PullRequest.testDeleteAndSetLabelsWithStringArguments.txt b/github/tests/ReplayData/PullRequest.testDeleteAndSetLabelsWithStringArguments.txt index 934f4102..cef84701 100644 --- a/github/tests/ReplayData/PullRequest.testDeleteAndSetLabelsWithStringArguments.txt +++ b/github/tests/ReplayData/PullRequest.testDeleteAndSetLabelsWithStringArguments.txt @@ -2,7 +2,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -13,7 +13,7 @@ https DELETE api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 204 @@ -24,7 +24,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 @@ -35,7 +35,7 @@ https PUT api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} ["wip", "refactoring"] 200 @@ -46,7 +46,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 diff --git a/github/tests/ReplayData/PullRequest.testGetLabels.txt b/github/tests/ReplayData/PullRequest.testGetLabels.txt index 6c28cec1..1361f0b2 100644 --- a/github/tests/ReplayData/PullRequest.testGetLabels.txt +++ b/github/tests/ReplayData/PullRequest.testGetLabels.txt @@ -2,7 +2,7 @@ https GET api.github.com None -/repos/jacquev6/PyGithub/pulls/31/labels +/repos/jacquev6/PyGithub/issues/31/labels {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200