This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
pushee/gitlab_provider.py
2020-04-03 14:10:37 +02:00

50 lines
1 KiB
Python

#!/usr/bin/env python3
from ogr.services.gitlab import GitlabService
class Gitlab:
def __init__(self, namespace, repo, token):
self.ogr_service = GitlabService(
token=token,
instance_url="https://gitlab.fi.muni.cz"
)
self.ogr_project = self.ogr_service.get_project(
repo=repo,
namespace=namespace
)
def post_mr(
self,
source_branch,
target_branch,
title,
description,
labels,
remove_source_branch,
assignee_ids,
):
self.ogr_project.create_pr(
title=title,
body=description,
target_branch=target_branch,
source_branch=source_branch
)
def get_mrs_for_branch(self, branch):
# TODO
pass
def merge_mr(self, iid):
# TODO
pass
def set_assignees(self, iid, assignee_ids):
# TODO
pass
def get_comments(self, iid, page=1):
# TODO
pass