From 265abb446e9512907ff256ccc6d39e6db647c6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 16 Dec 2023 13:53:50 +0100 Subject: [PATCH] Skip forks early in main branch bot Avoid creating useless jobs for forks. --- src/oca_github_bot/tasks/main_branch_bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/oca_github_bot/tasks/main_branch_bot.py b/src/oca_github_bot/tasks/main_branch_bot.py index ccf74d8f..184eee4a 100644 --- a/src/oca_github_bot/tasks/main_branch_bot.py +++ b/src/oca_github_bot/tasks/main_branch_bot.py @@ -153,6 +153,8 @@ def main_branch_bot(org, repo, branch, build_wheels, dry_run=False): def main_branch_bot_all_repos(org, build_wheels, dry_run=False): with github.login() as gh: for repo in gh.repositories_by(org): + if repo.fork: + continue for branch in repo.branches(): if not is_main_branch_bot_branch(branch): continue