From 658e3c66196dcc6a0e97919ab2ef382453a94454 Mon Sep 17 00:00:00 2001 From: Angela P Wen Date: Thu, 21 Dec 2023 13:38:16 -0800 Subject: [PATCH 1/2] Fix type error --- .github/actions/release-branches/release-branches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/release-branches/release-branches.py b/.github/actions/release-branches/release-branches.py index 664d016ed7..3aecc4e969 100644 --- a/.github/actions/release-branches/release-branches.py +++ b/.github/actions/release-branches/release-branches.py @@ -46,7 +46,7 @@ def main(): if consider_backports: for i in range(int(major_version.strip("v"))-1, 0, -1): branch_name = f"releases/v{i}" - if i >= OLDEST_SUPPORTED_MAJOR_VERSION: + if i >= int(OLDEST_SUPPORTED_MAJOR_VERSION): backport_target_branches.append(branch_name) f.write("backport_target_branches="+json.dumps(backport_target_branches)+"\n") From 0be92905083e1fbcf7491e075cd8ad0da02d01b6 Mon Sep 17 00:00:00 2001 From: Angela P Wen Date: Thu, 21 Dec 2023 13:43:00 -0800 Subject: [PATCH 2/2] Typecast `OLDEST_SUPPORTED_MAJOR_VERSION` when defined --- .github/actions/release-branches/release-branches.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/release-branches/release-branches.py b/.github/actions/release-branches/release-branches.py index 3aecc4e969..ad941bb0c3 100644 --- a/.github/actions/release-branches/release-branches.py +++ b/.github/actions/release-branches/release-branches.py @@ -13,7 +13,7 @@ with open(os.path.join(grandparent_dir, 'releases.ini')) as stream: config.read_string('[default]\n' + stream.read()) -OLDEST_SUPPORTED_MAJOR_VERSION = config['default']['OLDEST_SUPPORTED_MAJOR_VERSION'] +OLDEST_SUPPORTED_MAJOR_VERSION = int(config['default']['OLDEST_SUPPORTED_MAJOR_VERSION']) def main(): @@ -46,7 +46,7 @@ def main(): if consider_backports: for i in range(int(major_version.strip("v"))-1, 0, -1): branch_name = f"releases/v{i}" - if i >= int(OLDEST_SUPPORTED_MAJOR_VERSION): + if i >= OLDEST_SUPPORTED_MAJOR_VERSION: backport_target_branches.append(branch_name) f.write("backport_target_branches="+json.dumps(backport_target_branches)+"\n")