Example #1
0
 def create_pr(
     self,
     title: str,
     body: str,
     target_branch: str,
     source_branch: str,
     fork_username: str = None,
 ) -> "PullRequest":
     return GitlabPullRequest.create(
         project=self,
         title=title,
         body=body,
         target_branch=target_branch,
         source_branch=source_branch,
         fork_username=fork_username,
     )
Example #2
0
 def get_pr(self, pr_id: int) -> PullRequest:
     return GitlabPullRequest.get(project=self, id=pr_id)
Example #3
0
 def get_pr_list(self, status: PRStatus = PRStatus.open) -> List["PullRequest"]:
     return GitlabPullRequest.get_list(project=self, status=status)
Example #4
0
 def test_wrong_auth_static_method(self):
     # Verify that the exception handler is applied to static methods
     with pytest.raises(GitlabAPIException):
         GitlabPullRequest.get(self.project, 1)