@@ -231,6 +231,7 @@ def populate_release(
231231 post_version_spec ,
232232 post_version_message ,
233233 assets ,
234+ silent = False ,
234235):
235236 """Populate release assets and push tags and commits"""
236237 branch = branch or util .get_branch ()
@@ -251,13 +252,6 @@ def populate_release(
251252 release = util .release_for_url (gh , release_url )
252253
253254 # if the release is silent, the changelog source of truth is the GitHub release
254- util .log (f"Assets { assets } " )
255- silent = False
256- for asset in assets :
257- asset_path = Path (asset )
258- if asset_path .name == util .METADATA_JSON .name :
259- metadata = json .loads (asset_path .read_text (encoding = "utf-8" ))
260- silent = metadata .get ("silent" , False )
261255 body = release .body if silent else changelog .extract_current (changelog_path )
262256 util .log (f"release is silent: { silent } " )
263257 util .log (f"populate-release release.body: { release .body [100 :]} " )
@@ -550,7 +544,7 @@ def prep_git(ref, branch, repo, auth, username, url): # noqa
550544 return branch
551545
552546
553- def extract_changelog (dry_run , auth , changelog_path , release_url ):
547+ def extract_changelog (dry_run , auth , changelog_path , release_url , silent = False ):
554548 """Extract the changelog from the draft GH release body and update it.
555549
556550 > If the release must is silent, the changelog entry will be replaced by
@@ -560,10 +554,6 @@ def extract_changelog(dry_run, auth, changelog_path, release_url):
560554 gh = util .get_gh_object (dry_run = dry_run , owner = match ["owner" ], repo = match ["repo" ], token = auth )
561555 release = util .release_for_url (gh , release_url )
562556
563- # Check for silent status here to avoid request to often the GitHub API
564- metadata = util .extract_metadata_from_release_url (gh , release .html_url , auth )
565- silent = metadata .get ("silent" , False )
566-
567557 changelog_text = mdformat .text (release .body )
568558 changelog .update_changelog (changelog_path , changelog_text , silent = silent )
569559
0 commit comments