From 4c4b7213bbaaf5cfb9b23d3f7bf2461b9f86d135 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 3 Apr 2020 14:44:36 +0200 Subject: [PATCH] [IMP] runbot: remove pull_head_name patch filter Since we store the target_branch_name, filtering out pull head names that contains `patch-` is not necessary anymore. This commit is one first step towards a clean refactoring. --- runbot/models/branch.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/runbot/models/branch.py b/runbot/models/branch.py index bdeb7c95..c5a624fc 100644 --- a/runbot/models/branch.py +++ b/runbot/models/branch.py @@ -7,7 +7,6 @@ from odoo import models, fields, api from odoo.osv import expression _logger = logging.getLogger(__name__) -_re_patch = re.compile(r'.*patch-\d+$') class runbot_branch(models.Model): @@ -123,9 +122,7 @@ class runbot_branch(models.Model): pi = pull_info or branch._get_pull_info() if pi: branch.target_branch_name = pi['base']['ref'] - if not _re_patch.match(pi['head']['label']): - # label is used to disambiguate PR with same branch name - branch.pull_head_name = pi['head']['label'] + branch.pull_head_name = pi['head']['label'] else: branch.branch_name = ''