aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3
diff options
context:
space:
mode:
Diffstat (limited to 'pygithub3')
-rw-r--r--pygithub3/requests/pull_requests/comments.py2
-rw-r--r--pygithub3/services/pull_requests/comments.py6
-rw-r--r--pygithub3/tests/services/test_pull_requests.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/pygithub3/requests/pull_requests/comments.py b/pygithub3/requests/pull_requests/comments.py
index dd69894..1904f6c 100644
--- a/pygithub3/requests/pull_requests/comments.py
+++ b/pygithub3/requests/pull_requests/comments.py
@@ -32,7 +32,7 @@ class Create(Request):
return self.body
-class Edit(Request):
+class Update(Request):
uri = 'repos/{user}/{repo}/pulls/comments/{number}'
resource = Comment
body_schema = {
diff --git a/pygithub3/services/pull_requests/comments.py b/pygithub3/services/pull_requests/comments.py
index 2edbfdf..ebc4e4b 100644
--- a/pygithub3/services/pull_requests/comments.py
+++ b/pygithub3/services/pull_requests/comments.py
@@ -54,9 +54,9 @@ class Comments(Service, MimeTypeMixin):
)
def update(self, number, message, user=None, repo=None):
- """Edit a comment
+ """Update a comment
- :param str number: The id of the comment to edit
+ :param str number: The id of the comment to update
:param str message: Comment message
:param str user: Username
:param str repo: Repository
@@ -64,7 +64,7 @@ class Comments(Service, MimeTypeMixin):
.. note::
Remember :ref:`config precedence`
"""
- request = self.make_request('pull_requests.comments.edit',
+ request = self.make_request('pull_requests.comments.update',
number=number, body={'body': message}, user=user, repo=repo)
return self._patch(request)
diff --git a/pygithub3/tests/services/test_pull_requests.py b/pygithub3/tests/services/test_pull_requests.py
index 93646df..4a9fd41 100644
--- a/pygithub3/tests/services/test_pull_requests.py
+++ b/pygithub3/tests/services/test_pull_requests.py
@@ -170,12 +170,12 @@ class TestPullRequestCommentsService(TestCase):
('post', _('repos/user/repo/pulls/1/comments'))
)
- def test_EDIT(self, reqm):
+ def test_UPDATE(self, reqm):
reqm.return_value = mock_response(200)
data = {
'body': 'something completely different',
}
- self.service.edit(1, data)
+ self.service.update(1, data)
self.assertEqual(
reqm.call_args[0],
('patch', _('repos/user/repo/pulls/comments/1'))