parameters: (self, owner:str, branch:str)
return_statement: return True
docstring: reate a pull request in `self.branch_repo_name`.  The base branch of the
          pull request will be choosen based on the the milestone attached to
          the issue represented by `self.issue_number`  For example if the milestone
          is Release 13.0.1, then the base branch will be release/13.x. `branch`
          will be used as the compare branch.
          https://docs.github.com/en/get-started/quickstart/github-glossary#base-branch
          https://docs.github.com/en/get-started/quickstart/github-glossary#compare-branch
docstring_summary: reate a pull request in `self.branch_repo_name`.  The base branch of the
          pull request will be choosen based on the the milestone attached to
          the issue represented by `self.issue_number`  For example if the milestone
          is Release 13.0.1, then the base branch will be release/13.x. `branch`
          will be used as the compare branch.
          https://docs.github.com/en/get-started/quickstart/github-glossary#base-branch
          https://docs.github.com/en/get-started/quickstart/github-glossary#compare-branch
docstring_tokens: reate a pull request in self . branch_repo_name . The base branch of the pull request will be choosen based on the the milestone attached to the issue represented by self . issue_number For example if the milestone is Release 13 . 0 . 1 then the base branch will be release / 13 . x . branch will be used as the compare branch . https : // docs . github . com / en / get - started / quickstart / github - glossary#base - branch https : // docs . github . com / en / get - started / quickstart / github - glossary#compare - branch
function: def create_pull_request(self, owner:str, branch:str) -> bool:
          """
          reate a pull request in `self.branch_repo_name`.  The base branch of the
          pull request will be choosen based on the the milestone attached to
          the issue represented by `self.issue_number`  For example if the milestone
          is Release 13.0.1, then the base branch will be release/13.x. `branch`
          will be used as the compare branch.
          https://docs.github.com/en/get-started/quickstart/github-glossary#base-branch
          https://docs.github.com/en/get-started/quickstart/github-glossary#compare-branch
          """
          repo = github.Github(self.token).get_repo(self.branch_repo_name)
          issue_ref = '{}#{}'.format(self.repo_name, self.issue_number)
          pull = None
          release_branch_for_issue = self.release_branch_for_issue
          if release_branch_for_issue is None:
              return False
          try:
              pull = repo.create_pull(title='PR for {}'.format(issue_ref),
                                      body='resolves {}'.format(issue_ref),
                                      base=release_branch_for_issue,
                                      head='{}:{}'.format(owner, branch),
                                      maintainer_can_modify=False)
          except Exception as e:
              self.issue_notify_pull_request_failure(branch)
              raise e
  
          if pull is None:
              return False
  
          self.issue_notify_pull_request(pull)
  
          # TODO(tstellar): Do you really want to always return True?
          return True
function_tokens: def create_pull_request ( self , owner : str , branch : str ) -> bool : repo = github . Github ( self . token ) . get_repo ( self . branch_repo_name ) issue_ref = '{}#{}' . format ( self . repo_name , self . issue_number ) pull = None release_branch_for_issue = self . release_branch_for_issue if release_branch_for_issue is None : return False try : pull = repo . create_pull ( title = 'PR for {}' . format ( issue_ref ) , body = 'resolves {}' . format ( issue_ref ) , base = release_branch_for_issue , head = '{}:{}' . format ( owner , branch ) , maintainer_can_modify = False ) except Exception as e : self . issue_notify_pull_request_failure ( branch ) raise e if pull is None : return False self . issue_notify_pull_request ( pull ) # TODO(tstellar): Do you really want to always return True? return True