Skip to content

Commit

Permalink
Merge pull request #128 from howardjones/ask_scm_branch
Browse files Browse the repository at this point in the history
feat: ask_scm_branch_on_launch for job_template
  • Loading branch information
costastf committed Feb 2, 2024
2 parents f522f53 + 89961d4 commit 355f7b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion towerlib/entities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@
assert Settings
assert Saml
assert Label
assert WorkflowNodes
assert WorkflowNodes
23 changes: 18 additions & 5 deletions towerlib/entities/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,16 @@ def ask_credential_on_launch(self):
"""
return self._data.get('ask_credential_on_launch')

@property
def ask_scm_branch_on_launch(self):
"""Flag about whether to ask for SCM branch on launch.
Returns:
bool: True if set to ask for SCM branch on launch, False otherwise.
"""
return self._data.get('ask_scm_branch_on_launch')

@property
def survey_enabled(self):
"""Flag about whether the survey mode is enabled.
Expand Down Expand Up @@ -2001,7 +2011,6 @@ def module_name(self):
class WorkflowNodes(Entity):
"""Models the Workflow nodes entity of ansible tower."""


def __init__(self, tower_instance, data):
Entity.__init__(self, tower_instance, data)

Expand All @@ -2017,8 +2026,10 @@ def count(self):

@property
def next(self):
"""The `next` and `previous` fields provides links to
additional results if there are more than will fit on a single page.
"""Next page URL for paging.
The `next` and `previous` fields provides links to additional results if there are more
than will fit on a single page.
Returns:
string: url of next page.
Expand All @@ -2028,8 +2039,10 @@ def next(self):

@property
def previous(self):
"""The `next` and `previous` fields provides links to
additional results if there are more than will fit on a single page.
"""Previous page URL for paging.
The `next` and `previous` fields provides links to additional results if there are more
than will fit on a single page.
Returns:
string: url of previous page.
Expand Down

0 comments on commit 355f7b2

Please sign in to comment.