Skip to content

Commit 6ee3928

Browse files
authored
Merge pull request #277 from acsone/skip-forks-early-sbi
Skip forks early in main branch bot
2 parents aac1932 + c8d582e commit 6ee3928

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

newsfragments/277.feature

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Skip fork repos earlier in main branch bot, for better performance in organisations
2+
with a large number of forks.

src/oca_github_bot/tasks/main_branch_bot.py

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def main_branch_bot(org, repo, branch, build_wheels, dry_run=False):
153153
def main_branch_bot_all_repos(org, build_wheels, dry_run=False):
154154
with github.login() as gh:
155155
for repo in gh.repositories_by(org):
156+
if repo.fork:
157+
continue
156158
for branch in repo.branches():
157159
if not is_main_branch_bot_branch(branch):
158160
continue

0 commit comments

Comments
 (0)