[FIX] runbot: add missing repos

On prepare, if a commit is pushed, it will be added to the bundle
if no trigger exist in the project, or if a repo is not used by any
trigger, it may appear in the batch from when pushed but not in other
case, creating a strange behaviour. This is mainly the case when a repo
is in a project without tirgger, just a group of commit.
This commit is contained in:
Xavier-Do 2024-11-25 13:12:37 +01:00
parent 8c70e44ae9
commit 79953d8b5f

View File

@ -188,7 +188,7 @@ class Batch(models.Model):
pushed_repo = self.commit_link_ids.mapped('commit_id.repo_id') pushed_repo = self.commit_link_ids.mapped('commit_id.repo_id')
dependency_repos = triggers.mapped('dependency_ids') dependency_repos = triggers.mapped('dependency_ids')
all_repos = triggers.mapped('repo_ids') | dependency_repos all_repos = triggers.mapped('repo_ids') | dependency_repos | project.repo_ids
missing_repos = all_repos - pushed_repo missing_repos = all_repos - pushed_repo
foreign_projects = dependency_repos.mapped('project_id') - project foreign_projects = dependency_repos.mapped('project_id') - project