Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating
the new model: you should trust this data
deep – set to True to make a deep copy of the model
Returns
new model instance
create_file(file_query: str) → str[source]¶
Creates a new file on the gitlab repo
Parameters:
file_query(str): a string which contains the file path
and the file contents. The file path is the first line
in the string, and the contents are the rest of the string.
For example, “hello_world.md
# Hello World!”
Returns:str: A success or failure message
create_pull_request(pr_query: str) → str[source]¶
Makes a pull request from the bot’s branch to the base branch
Parameters:
pr_query(str): a string which contains the PR title
and the PR body. The title is the first line
in the string, and the body are the rest of the string.
For example, “Updated README
made changes to add info”
Returns:str: A success or failure message
delete_file(file_path: str) → str[source]¶
Deletes a file from the repo
:param file_path: Where the file is
:type file_path: str
Returns
Success or failure message