def __init__(self, issue_id: int): RepositoryConnection.__init__(self) try: self.issue: ProjectIssue = self._remote_project.issues.get(issue_id, lazy=False) except GitlabGetError: Utils.log(LogType.WARNING, f"No issue with ID {issue_id}") sys.exit(1)
def __init__(self, pipeline_id: int) -> None: RepositoryConnection.__init__(self) try: self.pipeline: ProjectPipeline = self._remote_project.pipelines.get( pipeline_id, lazy=False) except GitlabGetError: Utils.log(LogType.WARNING, f"No pipeline with ID {pipeline_id}") sys.exit(1)
def __init__(self, issue_id: int): """ Creates a new issue connection. Requires a valid issue ID for the current project. """ RepositoryConnection.__init__(self) try: self.issue: ProjectIssue = self._remote_project.issues.get( issue_id, lazy=False) except GitlabGetError: Utils.log(LogType.WARNING, f"No issue with ID {issue_id}") sys.exit(1)
def __init__(self, status: Optional[PipelineStatus] = None, ref: Optional[str] = None) -> None: RepositoryConnection.__init__(self) self.status: Optional[PipelineStatus] = status self.ref: Optional[str] = ref if ref is not None and ref not in self._local_repo.refs: # Print a warning, if the ref is not found LOCALLY # The remote may contain refs, that do not exists inside the local copy, # therefore only a warning is printed. Utils.log(LogType.WARNING, f"Ref '{ref}' is not found locally.")
def __init__( # pylint: disable=too-many-arguments self, for_project: bool, merged: bool, opened: bool, closed: bool, show_url: bool) -> None: RepositoryConnection.__init__(self) self.for_project = for_project self.show_url = show_url if not merged and not opened and not closed: return self.merged = merged self.opened = opened self.closed = closed
def __init__(self, target_branch: str, fork: bool) -> None: RepositoryConnection.__init__(self) self.__target_branch = target_branch self.__fork = fork
def __init__(self, opened: bool, closed: bool, assigned: bool, for_project: bool) -> None: RepositoryConnection.__init__(self) self.opened = opened self.closed = closed self.assigned = assigned self.for_project = for_project
def __init__(self) -> None: RepositoryConnection.__init__(self)