mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: link on reference batch
This commit is contained in:
parent
4c8ab63af8
commit
ebb342ea0c
@ -235,7 +235,7 @@ class Batch(models.Model):
|
||||
]).sorted(lambda b: (len(b.commit_ids & merge_base_commits), b.id), reverse=True)
|
||||
if batches:
|
||||
batch = batches[0]
|
||||
self._log('Using batch %s to define missing commits', batch.id)
|
||||
self._log('Using batch [%s](%s) to define missing commits', batch.id, batch._url())
|
||||
batch_exiting_commit = batch.commit_ids.filtered(lambda c: c.repo_id in merge_base_commits.repo_id)
|
||||
not_matching = (batch_exiting_commit - merge_base_commits)
|
||||
if not_matching:
|
||||
|
@ -27,4 +27,4 @@ class Codeowner(models.Model):
|
||||
def _get_version_domain(self):
|
||||
""" Helper to get the evaluated version domain """
|
||||
self.ensure_one()
|
||||
return ast.eval(self.version_domain) if self.version_domain else []
|
||||
return ast.literal_eval(self.version_domain) if self.version_domain else []
|
||||
|
@ -95,6 +95,11 @@
|
||||
<field name="name">15.0-dev-tri</field>
|
||||
<field name="project_id" ref="runbot.main_project"/>
|
||||
</record>
|
||||
<record id="bundle_master_dev_partial_tri" model="runbot.bundle">
|
||||
<field name="name">master-dev-partial-tri</field>
|
||||
<field name="project_id" ref="runbot.main_project"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="bundle_runbot_15_0" model="runbot.bundle">
|
||||
<field name="name">15.0</field>
|
||||
|
@ -39,7 +39,7 @@ class Runbot(models.AbstractModel):
|
||||
if bundle.is_base:
|
||||
dev_remote = main_remote
|
||||
self.env['runbot.branch'].create({'remote_id': dev_remote.id, 'name': bundle.name, 'is_pr': False})
|
||||
if not bundle.sticky:
|
||||
if not bundle.is_base:
|
||||
mock_github.return_value = {
|
||||
'base': {
|
||||
'ref': bundle.base_id.name
|
||||
@ -57,6 +57,9 @@ class Runbot(models.AbstractModel):
|
||||
count += 1
|
||||
branch.flush()
|
||||
|
||||
if 'partial' in bundle.name:
|
||||
break
|
||||
|
||||
if not bundle.is_base:
|
||||
pr = not pr
|
||||
|
||||
@ -90,7 +93,7 @@ class Runbot(models.AbstractModel):
|
||||
def git(command):
|
||||
if command[0] == 'merge-base':
|
||||
_, sha1, sha2 = command
|
||||
return sha1 if sha1 == sha2 else sha2 if bundle.is_base else '%s_%s' % (sha1, sha2)
|
||||
return sha1 if sha1 == sha2 else sha2 #if bundle.is_base else '%s_%s' % (sha1, sha2)
|
||||
elif command[0] == 'rev-list':
|
||||
_, _, _, shas = command
|
||||
sha1, sha2 = shas.split('...')
|
||||
|
Loading…
Reference in New Issue
Block a user