5
0
mirror of https://github.com/odoo/runbot.git synced 2025-03-21 18:35:45 +07:00
runbot/runbot_merge/views/runbot_merge_project.xml
Xavier Morel 9c51f87aed [ADD] runbot_merge: support for non-webhook staging validation
Add support for the ability to validate *stagings* over RPC rather
than via webhook. This may later be expanded to PRs as well.

The core motivation for this is to avoid bouncing through github which
sometimes drops the ball on statuses, and it's frustrating to have a
staging time out because GH fucked up.

Implemented via RPC, requiring both the staging itself (by id) and the
head commit being affected, as that is necessary to know what CIs are
required for that head and correctly report cross branch on the
various PRs.

Fix  (kinda)
2024-06-04 08:56:51 +02:00

99 lines
4.7 KiB
XML

<odoo>
<record id="runbot_merge_form_project" model="ir.ui.view">
<field name="name">Project Form</field>
<field name="model">runbot_merge.project</field>
<field name="arch" type="xml">
<form>
<field name="freeze_id" invisible="1"/>
<header>
<button type="object" name="action_prepare_freeze"
string="Freeze"
attrs="{'invisible': [('freeze_id', '!=', False)]}"/>
<button type="object" name="action_prepare_freeze"
string="View Freeze" class="oe_highlight"
attrs="{'invisible': [('freeze_id', '=', False)]}"/>
</header>
<sheet>
<div class="oe_title">
<h1><field name="name" placeholder="Name"/></h1>
</div>
<group>
<group>
<field name="github_prefix" string="bot name"/>
</group>
</group>
<group>
<group>
<field name="github_token"/>
<field name="github_name" readonly="0"
help="Identity when creating new commits, defaults to github name, falls back to login."/>
<field name="github_email" readonly="0"
help="Identity when creating new commits, defaults to public email, falls back to primary email."/>
<field name="secret"/>
<span attrs="{'invisible': [
'|',
('staging_statuses', '=', False),
('staging_rpc', '=', False),
]}" class="alert alert-warning" role="alert">
Avoid overlaps between GH and RPC as the older
GH statuses may overwrite more recent RPC statuses.
</span>
<field name="staging_statuses" string="Validate via GH statuses"/>
<field name="staging_rpc" string="Validate via direct RPC"/>
</group>
<group>
<field name="staging_enabled" widget="boolean_toggle"/>
<field name="staging_priority"/>
<field name="uniquifier"/>
<field name="ci_timeout"/>
<field name="batch_limit"/>
</group>
</group>
<group class="oe_edit_only">
<group colspan="4">
<label for="freeze_reminder">
Reminder to show after freeze
</label>
<field colspan="4" name="freeze_reminder" nolabel="1"/>
</group>
</group>
<separator string="Repositories"/>
<field name="repo_ids">
<tree>
<field name="sequence" widget="handle"/>
<button type="object" name="get_formview_action" icon="fa-external-link"/>
<field name="name"/>
<field name="branch_filter"/>
<field name="status_ids" widget="many2many_tags"/>
</tree>
</field>
<separator string="Branches"/>
<field name="branch_ids">
<tree editable="bottom" decoration-muted="not active">
<field name="sequence" widget="handle" />
<button type="object" name="get_formview_action" icon="fa-external-link"/>
<field name="name"/>
<field name="active" widget="boolean_toggle"/>
<field name="staging_enabled" widget="boolean_toggle"/>
</tree>
</field>
</sheet>
</form>
</field>
</record>
<record id="project_freeze_reminder" model="ir.ui.view">
<field name="name">Project Form</field>
<field name="model">runbot_merge.project</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="freeze_reminder" nolabel="1" readonly="1"/>
</sheet>
</form>
</field>
</record>
</odoo>