Skip to content

GitPlan

GitPlan(plan_id, branch, force)

Base GitPlan abstraction

Initialize GitPlan object

Parameters:

Name Type Description Default
plan_id str

id of the Plan

required
branch str

current branch

required
force bool

force git context reset

required
Source code in TM1py/Objects/GitPlan.py
def __init__(self, plan_id: str, branch: str, force: bool):
    """Initialize GitPlan object
    :param plan_id: id of the Plan
    :param branch: current branch
    :param force: force git context reset
    """
    self._plan_id = plan_id
    self._branch = branch
    self._force = force

branch property

force property

plan_id property

GitPullPlan(plan_id, branch, force, commit, operations)

Bases: GitPlan

GitPushPlan abstraction based on GitPlan

Initialize GitPushPlan object

Parameters:

Name Type Description Default
plan_id str

id of the PullPlan

required
branch str

current branch to base the pullplan on

required
force bool

force git context reset

required
commit GitCommit

GitCommit of the commit to pull

required
operations List[str]

list of changes made upon pulling

required
Source code in TM1py/Objects/GitPlan.py
def __init__(self, plan_id: str, branch: str, force: bool, commit: GitCommit, operations: List[str]):
    """Initialize GitPushPlan object
    :param plan_id: id of the PullPlan
    :param branch: current branch to base the pullplan on
    :param force: force git context reset
    :param commit: GitCommit of the commit to pull
    :param operations: list of changes made upon pulling
    """
    self._commit = commit
    self._operations = operations

    super().__init__(plan_id=plan_id, branch=branch, force=force)

commit property

operations property

GitPushPlan(plan_id, branch, force, new_branch, new_commit, parent_commit, source_files)

Bases: GitPlan

GitPushPlan abstraction based on GitPlan

Initialize GitPushPlan object

Parameters:

Name Type Description Default
plan_id str

id of the PushPlan

required
branch str

current branch to base the pushplan on

required
force bool

force git context reset

required
new_branch str

the new branch that will be pushed to

required
new_commit GitCommit

GitCommit of the new commit

required
parent_commit GitCommit

The current commit in the branch

required
source_files List[str]

list of included files in the push

required
Source code in TM1py/Objects/GitPlan.py
def __init__(
    self,
    plan_id: str,
    branch: str,
    force: bool,
    new_branch: str,
    new_commit: GitCommit,
    parent_commit: GitCommit,
    source_files: List[str],
):
    """Initialize GitPushPlan object
    :param plan_id: id of the PushPlan
    :param branch: current branch to base the pushplan on
    :param force: force git context reset
    :param new_branch: the new branch that will be pushed to
    :param new_commit: GitCommit of the new commit
    :param parent_commit: The current commit in the branch
    :param source_files: list of included files in the push
    """
    self._new_branch = new_branch
    self._new_commit = new_commit
    self._parent_commit = parent_commit
    self._source_files = source_files

    super().__init__(plan_id=plan_id, branch=branch, force=force)

new_branch property

new_commit property

parent_commit property

source_files property