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_branch(proposed_branch_name: str) → str[source]¶
Create a new branch, and set it as the active bot branch.
Equivalent to git switch -c proposed_branch_name
If the proposed branch already exists, we append _v1 then _v2…
until a unique name is found.
Returns
A plaintext success message.
Return type
str
create_file(file_query: str) → str[source]¶
Creates a new file on the Github 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
create_review_request(reviewer_username: str) → str[source]¶
Creates a review request on THE open pull request
that matches the current active_branch.
Parameters
reviewer_username (str) – The username of the person who is being requested
Returns
A message confirming the creation of the review request
Return type
str