Skip to content

Commit

Permalink
[CCI] Fixing github_release_notes trial_info option for MetaCI compat…
Browse files Browse the repository at this point in the history
…ibility (#2191)

* [CCI] Fixing github_release_notes trial_info option for MetaCI compatibility
Co-authored-by: David Glick <dglick@salesforce.com>
  • Loading branch information
jofsky committed Dec 9, 2020
1 parent df638d0 commit 512dae3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cumulusci/tasks/release_notes/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ def render(self, existing_content=""):
f"{PROD_LOGIN_URL}/packaging/installPackage.apexp?p0={version_id}",
]

if trial_info is True:
if trial_info:
if (
version_id
or self.release_notes_generator.sandbox_date
or self.release_notes_generator.production_date
):
result.append("")
result += ["## Trialforce Template ID", "`TBD`"]
result += ["## Trialforce Template ID", f"{trial_info}"]
return "\r\n".join(result)
14 changes: 7 additions & 7 deletions cumulusci/tasks/release_notes/tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def test_package_with_version_id_no_dates_trial(self):
version_id="04t0000asdf",
sandbox_date=None, # need to set explicitly due to mock, will default to None when using CLI
production_date=None, # need to set explicitly due to mock, will default to None when using CLI
trial_info=True,
trial_info="`TBD`",
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand All @@ -660,7 +660,7 @@ def test_package_version_id_both_dates_with_trial(self):
version_id="04t0000asdf",
sandbox_date="2020-10-10",
production_date="2020-10-11",
trial_info=True,
trial_info="`TBD`",
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand All @@ -676,7 +676,7 @@ def test_package_version_id_sandbox_date_with_trial(self):
version_id="04t0000asdf",
sandbox_date="2020-10-10",
production_date=None, # need to set explicitly due to mock, will default to None when using CLI
trial_info=True,
trial_info="`TBD`",
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand Down Expand Up @@ -750,7 +750,7 @@ def test_package_no_version_id_sandbox_date_trial(self):
version_id="",
sandbox_date="2020-10-10", # need to set explicitly due to mock, will default to None when using CLI
production_date=None, # need to set explicitly due to mock, will default to None when using CLI
trial_info=True, # need to set explicitly due to mock, will default to False when using CLI
trial_info="`TBD`", # need to set explicitly due to mock, will default to False when using CLI
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand All @@ -765,7 +765,7 @@ def test_package_no_version_id_production_date_trial(self):
version_id="",
sandbox_date=None, # need to set explicitly due to mock, will default to None when using CLI
production_date="2020-10-10",
trial_info=True, # need to set explicitly due to mock, will default to False when using CLI
trial_info="`TBD`", # need to set explicitly due to mock, will default to False when using CLI
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand All @@ -780,7 +780,7 @@ def test_package_no_version_id_both_dates_trial(self):
version_id="",
sandbox_date="2020-10-10",
production_date="2020-10-11",
trial_info=True,
trial_info="`TBD`",
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand All @@ -795,7 +795,7 @@ def test_package_no_version_no_dates_trial(self):
version_id="",
sandbox_date=None, # need to set explicitly due to mock, will default to None when using CLI
production_date=None, # need to set explicitly due to mock, will default to None when using CLI
trial_info=True,
trial_info="`TBD`",
)
parser = InstallLinkParser(generator, "Title")
parser.parse("abc")
Expand Down

0 comments on commit 512dae3

Please sign in to comment.