Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] do not use MAIN_BRANCHES anymore #601

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading