Skip to content

Commit

Permalink
Merge pull request #601 from lefilament/fix-branches
Browse files Browse the repository at this point in the history
[FIX] do not use MAIN_BRANCHES anymore
  • Loading branch information
sbidoul authored Jan 19, 2024
2 parents 9a17033 + 2841063 commit feddb7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
16 changes: 0 additions & 16 deletions tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions tools/oca_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit feddb7a

Please sign in to comment.