From 2841063df9ec5a7d2cc38fe4b71177930ef25712 Mon Sep 17 00:00:00 2001 From: remi-filament <30716308+remi-filament@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:52:28 +0100 Subject: [PATCH] [UPD] remove deprecated MAIN_BRANCHES --- tools/config.py | 16 ---------------- tools/oca_projects.py | 4 ++-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/tools/config.py b/tools/config.py index 4c20d379..29009e34 100644 --- a/tools/config.py +++ b/tools/config.py @@ -69,21 +69,5 @@ def write_config(config): } -# deprecated, use is_main_branch() instead -MAIN_BRANCHES = ( - "6.1", - "7.0", - "8.0", - "9.0", - "10.0", - "11.0", - "12.0", - "13.0", - "14.0", - "15.0", - "16.0", -) - - def is_main_branch(branch): return re.match(r"^(6\.1|\d+\.0)$", branch) diff --git a/tools/oca_projects.py b/tools/oca_projects.py index 20aba148..976c67e5 100644 --- a/tools/oca_projects.py +++ b/tools/oca_projects.py @@ -18,7 +18,7 @@ import tempfile import appdirs -from .config import MAIN_BRANCHES, NOT_ADDONS +from .config import NOT_ADDONS, is_main_branch from .github_login import login ALL = ["OCA_PROJECTS", "OCA_REPOSITORY_NAMES", "url"] @@ -234,7 +234,7 @@ def get_repositories(): return all_repos -def get_repositories_and_branches(repos=(), branches=MAIN_BRANCHES, branch_filter=None): +def get_repositories_and_branches(repos=(), branches=(), branch_filter=is_main_branch): gh = login() for repo in gh.repositories_by("OCA"): if repos and repo.name not in repos: