Skip to content

Commit

Permalink
limit the conditions for auto release note gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry committed Aug 23, 2021
1 parent 2262b1b commit b6d9380
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions biothings/hub/datarelease/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,13 +1513,24 @@ def get_release_note(self, old, new, format="txt", prefix="release_*"):
def create_release_note_from_build(self, build_doc):
@asyncio.coroutine
def _():
if build_doc.get("release_note"):
self.logger.info(
"Not a brand-new build. "
"Skip release note automation.")
return
try:
old = get_previous_collection(build_doc["_id"])
except AssertionError:
self.logger.warning(
"Cannot find the previous build "
"while creating a release note.")
"Cannot find the previous build. "
"Create a fresh release note.")
old = "none"

if old == build_doc["_id"]:
self.logger.error(
"Error finding the previous build. "
"Skip release note automation. ")
return
yield from self.create_release_note(old=old, new=build_doc["_id"])

build_conf = AutoBuildConfig(build_doc['build_config'])
Expand Down

0 comments on commit b6d9380

Please sign in to comment.