classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
parse_issues(issues: List[Issue]) → List[dict][source]¶
Extracts title and number from each Issue and puts them in a dictionary
:param issues: A list of gitlab Issue objects
:type issues: List[Issue]
Returns
A dictionary of issue titles and numbers
Return type
List[dict]
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
read_file(file_path: str) → str[source]¶
Reads a file from the gitlab repo
:param file_path: the file path
:type file_path: str
Returns
The file decoded as a string
Return type
str
run(mode: str, query: str) → str[source]¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
update_file(file_query: str) → str[source]¶
Updates a file with new content.
:param file_query: Contains the file path and the file contents.
The old file contents is wrapped in OLD <<<< and >>>> OLD
The new file contents is wrapped in NEW <<<< and >>>> NEW
For example:
test/hello.txt
OLD <<<<
Hello Earth!
>>>> OLD
NEW <<<<
Hello Mars!
>>>> NEW
Returns
A success or failure message