These are final steps to be run depending on whether any changes were received from NetBox.
If no changes > delete the branch
If changes > push the branch
|
def push_branch(repo, branch_name, remote="origin"): |
|
""" Perform git push of the given branch to the named remote. |
|
|
|
:param repo: The repo to operate on |
|
:type repo: :class:`git.cmd.Git` |
|
:param branch_name: The git branch to push |
|
:type branch_name: str |
|
:param remote: The name of the git remote to push to |
|
:type remote: str |
|
""" |
|
pass |
|
|
|
|
|
def delete_branch(repo, branch_name): |
|
""" Delete the given git branch from the repo. |
|
|
|
:param repo: The repo to operate on |
|
:type repo: :class:`git.cmd.Git` |
|
:param branch_name: The git branch to delete |
|
:type branch_name: str |
|
""" |
|
pass |
These are final steps to be run depending on whether any changes were received from NetBox.
If no changes > delete the branch
If changes > push the branch
netbox-git/netboxgit/gitstuff.py
Lines 182 to 203 in 1f425be