mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[IMP] runbot: add draft detection form titl
This commit is contained in:
parent
3a9832d747
commit
891d2d71e8
@ -113,11 +113,11 @@ class Branch(models.Model):
|
||||
pi = branch.is_pr and (pull_info or pull_info_dict.get((branch.remote_id, branch.name)) or branch._get_pull_info())
|
||||
if pi:
|
||||
try:
|
||||
branch.draft = pi.get('draft', False)
|
||||
branch.alive = pi.get('state', False) != 'closed'
|
||||
branch.target_branch_name = pi['base']['ref']
|
||||
branch.pull_head_name = pi['head']['label']
|
||||
branch.pr_title = pi['title']
|
||||
branch.draft = pi.get('draft', False) or branch.pr_title and (branch.pr_title.startswith('[DRAFT]') or branch.pr_title.startswith('[WIP]'))
|
||||
branch.pr_body = pi['body']
|
||||
branch.pr_author = pi['user']['login']
|
||||
pull_head_repo_name = False
|
||||
|
@ -45,6 +45,10 @@
|
||||
<td>Target Branch</td>
|
||||
<td t-esc="branch.target_branch_name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pr title</td>
|
||||
<td t-esc="branch.pr_title"/>
|
||||
</tr>
|
||||
</t>
|
||||
<t t-elif="branch_pr">
|
||||
<tr>
|
||||
|
@ -19,6 +19,8 @@
|
||||
<field name="target_branch_name"/>
|
||||
<field name="head"/>
|
||||
<field name="alive"/>
|
||||
<field name="pr_title"/>
|
||||
<field name="pr_body"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user