mirror of
https://github.com/odoo/runbot.git
synced 2025-03-30 23:05:44 +07:00
[FIX]: fix codeowner
A corner case was discovered when a pr is open but the pr is not in the codeowner commits.
This commit is contained in:
parent
ad573d64cf
commit
910843f06d
@ -1116,9 +1116,11 @@ class ConfigStep(models.Model):
|
|||||||
success = False
|
success = False
|
||||||
return success
|
return success
|
||||||
|
|
||||||
def _modified_files(self, build, commit_link_links = None):
|
def _modified_files(self, build, commit_link_links=None):
|
||||||
modified_files = {}
|
modified_files = {}
|
||||||
for commit_link in commit_link_links or build.params_id.commit_link_ids:
|
if commit_link_links is None:
|
||||||
|
commit_link_links = build.params_id.commit_link_ids
|
||||||
|
for commit_link in commit_link_links:
|
||||||
commit = commit_link.commit_id
|
commit = commit_link.commit_id
|
||||||
modified = commit.repo_id._git(['diff', '--name-only', '%s..%s' % (commit_link.merge_base_commit_id.name, commit.name)])
|
modified = commit.repo_id._git(['diff', '--name-only', '%s..%s' % (commit_link.merge_base_commit_id.name, commit.name)])
|
||||||
if modified:
|
if modified:
|
||||||
|
@ -73,7 +73,8 @@ class ConfigStep(models.Model):
|
|||||||
if not self._check_limits(build):
|
if not self._check_limits(build):
|
||||||
return
|
return
|
||||||
|
|
||||||
prs = bundle.branch_ids.filtered(lambda branch: branch.is_pr and branch.alive)
|
build_repositories = build.params_id.commit_link_ids.commit_id.repo_id
|
||||||
|
prs = bundle.branch_ids.filtered(lambda branch: branch.is_pr and branch.alive and (branch.remote_id.repo_id in build_repositories))
|
||||||
|
|
||||||
# skip draft pr
|
# skip draft pr
|
||||||
draft_prs = prs.filtered(lambda pr: pr.draft)
|
draft_prs = prs.filtered(lambda pr: pr.draft)
|
||||||
|
Loading…
Reference in New Issue
Block a user