gitlab_mr.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:gitlab-merge-request 作者: anti-social 项目源码 文件源码
def get_remote_branch_name(self, project, local_branch, remote):
        # check if there is upstream for local branch
        tracking_branch = self.repo.branches[local_branch].tracking_branch()
        if tracking_branch:
            remote_branch = tracking_branch.name.partition('/')[2]
        else:
            remote_branch = local_branch
        try:
            project.branches.get(remote_branch)
        except GitlabGetError:
            err('Branch [%s] from project [%s] not found',
                remote_branch, project.path_with_namespace)
        except GitlabConnectionError as e:
            err('%s', e)
        return remote_branch
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号