mirror of
https://github.com/odoo/runbot.git
synced 2025-03-17 16:35:47 +07:00

Provides a less manual interface for creating the freeze: * takes the name of the branch to create * takes any number of PRs which must be part of the freeze * takes PRs representing the HEADs of the new branches Then essentially takes care of the test. Implementation of the actual wizard is not trivial but fairly straightforward and linear, biggest issue is not being able to `project_id.branch_ids[1]` to get the new branch, not sure why but it seems to ignore the ordering, clearing the cache doens't fix it. When creating the branches, add a sleep after each one for secondary rate limiting purposes. Same when deleting branches. Also the forwardbot has been updated to disable the forwardport cron while a freeze is ongoing, this simplifies the freezing process. Note: after recommendation of @aab-odoo, tried using `_applyChanges` in `_checkState` but it simply did not work: the two relational fields got completely frozen and were impossible to update, which is less than ideal. Oh well, hopefully it works well enough like this for now.
79 lines
3.2 KiB
XML
79 lines
3.2 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="secret"/>
|
|
</group>
|
|
<group>
|
|
<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"/>
|
|
<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" />
|
|
<field name="name"/>
|
|
<field name="active"/>
|
|
</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>
|