From 6652cffccbba5c82b1738e16566355db5db83598 Mon Sep 17 00:00:00 2001 From: ohemorange Date: Mon, 8 Jun 2026 16:11:52 -0700 Subject: [PATCH] Generate and print post-release community forum post text in `finish_release.py` (#10659) Item 5 of https://github.com/certbot/certbot/issues/10600 When this is merged, the setup section of the [release process](https://github.com/EFForg/certbot-misc/wiki/The-Mystical-Release-Process) should be modified. - `gh` should be added to os packages for mac and debian - A new step should be added: "Run `gh auth login` and log into a GitHub account." Technically any account should work here. The contents of the step saying to post to the community forum should be shortened to say something like "copy the output from the terminal." We could add the link to the client-dev tag here, but personally I think it's easiest to just keep it in the release instructions. --- tools/finish_release.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/finish_release.py b/tools/finish_release.py index 9ab0aaec2..f8c5d5528 100755 --- a/tools/finish_release.py +++ b/tools/finish_release.py @@ -176,10 +176,34 @@ def fetch_version_number(major_version=None): return version raise ValueError('Release not found on Azure Pipelines!') +def generate_community_forum_post(version: str): + print('Generating announcement text for community forum post') + + cmd = f"gh release view v{version} --json body -t {{{{.body}}}}".split() + + try: + process = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True) + except (subprocess.CalledProcessError, OSError): + print("Generating announcement text failed.") + sys.exit(1) + + changelog = process.stdout + + print('Subject:') + print() + print(f'Certbot {version} Release') + print() + print('Contents:') + print() + print(f'Certbot {version} has just been released. The changelog for the release is:') + print() + print(changelog) + def main(args): parsed_args = parse_args(args) version = fetch_version_number() promote_snaps(ALL_SNAPS, 'beta', version) + generate_community_forum_post(version) if __name__ == "__main__": main(sys.argv[1:])