mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Refactor common header constants and custom media type
This commit is contained in:
@@ -35,9 +35,9 @@
|
||||
################################################################################
|
||||
|
||||
import github.GithubObject
|
||||
|
||||
import github.NamedUser
|
||||
|
||||
import Consts
|
||||
|
||||
class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
@@ -205,7 +205,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
self._requester,
|
||||
self.url + "/reactions",
|
||||
None,
|
||||
headers={'Accept': 'application/vnd.github.squirrel-girl-preview'}
|
||||
headers={'Accept': Consts.mediaTypeReactionsPreview}
|
||||
)
|
||||
|
||||
def create_reaction(self, reaction_type):
|
||||
@@ -226,7 +226,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
"POST",
|
||||
self.url + "/reactions",
|
||||
input=post_parameters,
|
||||
headers={'Accept': 'application/vnd.github.squirrel-girl-preview'}
|
||||
headers={'Accept': Consts.mediaTypeReactionsPreview}
|
||||
)
|
||||
return github.Reaction.Reaction(self._requester, headers, data, completed=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user