From d86e3a4a91842157864db956f2fead0177aad2b9 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Mon, 21 Oct 2024 14:07:58 -0700 Subject: [PATCH] 23936 - For auth release for now (#1789) --- releases/release_to_zenhub_auth.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 releases/release_to_zenhub_auth.py diff --git a/releases/release_to_zenhub_auth.py b/releases/release_to_zenhub_auth.py new file mode 100644 index 000000000..807277495 --- /dev/null +++ b/releases/release_to_zenhub_auth.py @@ -0,0 +1,18 @@ +# TODO - remove when SBC connect takes over auth releases again. +from dotenv import load_dotenv +from util import add_issues_to_release, create_release, get_issue_id, get_issues_from_repo, get_workspace_release_for_report + +load_dotenv() + +auth_release_issue_ids, release_names = get_issues_from_repo('sbc-auth', latest_release_only=True) +target_release_name = f'Auth Release - {release_names[0]}' +release_id = get_workspace_release_for_report(target_release_name) +if release_id is None: + release_id = create_release(target_release_name) + print(f'Zenhub release created id: {release_id} - {target_release_name}') +else: + print(f'Zenhub release found id: {release_id} - {target_release_name}') +for issue in auth_release_issue_ids: + issue_id = get_issue_id(issue) + add_issues_to_release(issue_id, release_id) + print(f'Adding issue {issue} - {issue_id} to Zenhub release {release_id}')