# Path: flask_github/client/messages.py
# class PullRequest(msgs.Message):
#   title = msgs.StringField(1)
#   base = msgs.StringField(2)
#   head = msgs.StringField(3)
#   body = msgs.StringField(4)
#   issue = msgs.StringField(5)
# 
# Path: flask_github/client/messages.py
# class CommitMessage(msgs.Message):
#   commit_message = msgs.StringField(1)
# 
# Path: flask_github/client/requests.py
# class PullRequestResponse(msgs.Message):
#   response = msgs.MessageField('PullRequest', 1)
# 
# Path: flask_github/client/requests.py
# class PullRequestListResponse(msgs.Message):
#   response = msgs.MessageField('PullRequest', 1, repeated=True)


from pullreqsreviewcomments import PullReviewComments
from ..messages import PullRequest
from ..messages import CommitMessage
from ..requests import PullRequestResponse
from ..requests import PullRequestListResponse

    return self.client.post(
      'repos/%s/%s/pulls' % (self.client.user(user), repo), data=msg,
      msg_type=PullRequestResponse)

  def create_from_issue(self, repo, issue, base, head, user=None):
    msg = PullRequest(
      issue=issue,
      base=base,
      head=head)
    return self.client.post(
      'repos/%s/%s/pulls' % (
        self.client.user(user), repo), data=msg, msg_type=PullRequestResponse)

  def list_commits(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/pulls/%s/commits' % (
        self.client.user(user), repo, id), msg_type=None)

  def list_files(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/pulls/%s/files' % (
        self.client.user(user), repo, id), msg_type=None)

  def get_if_merged(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/pulls/%s/merge' % (
        self.client.user(user), repo, id), msg_type=None)

  def merge(self, repo, id, commit_message=None, user=None):
    if commit_message:

# Path: flask_github/client/messages.py
# class PullRequest(msgs.Message):
#   title = msgs.StringField(1)
#   base = msgs.StringField(2)
#   head = msgs.StringField(3)
#   body = msgs.StringField(4)
#   issue = msgs.StringField(5)
# 
# Path: flask_github/client/messages.py
# class CommitMessage(msgs.Message):
#   commit_message = msgs.StringField(1)
# 
# Path: flask_github/client/requests.py
# class PullRequestResponse(msgs.Message):
#   response = msgs.MessageField('PullRequest', 1)
# 
# Path: flask_github/client/requests.py
# class PullRequestListResponse(msgs.Message):
#   response = msgs.MessageField('PullRequest', 1, repeated=True)


# Path: flask_github/client/pullreqs/pullreqs.py
from pullreqsreviewcomments import PullReviewComments
from ..messages import PullRequest
from ..messages import CommitMessage
from ..requests import PullRequestResponse
from ..requests import PullRequestListResponse

    return self.client.post(
      'repos/%s/%s/pulls' % (self.client.user(user), repo), data=msg,
      msg_type=PullRequestResponse)

  def create_from_issue(self, repo, issue, base, head, user=None):
    msg = PullRequest(
      issue=issue,
      base=base,
      head=head)
    return self.client.post(
      'repos/%s/%s/pulls' % (
        self.client.user(user), repo), data=msg, msg_type=PullRequestResponse)

  def list_commits(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/pulls/%s/commits' % (
        self.client.user(user), repo, id), msg_type=None)

  def list_files(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/pulls/%s/files' % (
        self.client.user(user), repo, id), msg_type=None)

  def get_if_merged(self, repo, id, user=None):
    return self.client.get(
      'repos/%s/%s/pulls/%s/merge' % (
        self.client.user(user), repo, id), msg_type=None)

  def merge(self, repo, id, commit_message=None, user=None):
    if commit_message:

      msg = CommitMessage(
