diff --git a/newsfragments/277.feature b/newsfragments/277.feature new file mode 100644 index 00000000..ffb726d8 --- /dev/null +++ b/newsfragments/277.feature @@ -0,0 +1,2 @@ +Skip fork repos earlier in main branch bot, for better performance in organisations +with a large number of forks. 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