runbot/runbot_merge/views/queues.xml
Xavier Morel 6a1b77b92c [ADD] runbot_merge: support for unstaged patches
Unstaged changes can be useful or necessary for some tasks
e.g. absolute emergency (where even faking the state of a staging is
not really desirable, if that's even possible anymore), or changes
which are so broad they're difficult to stage (e.g. t10s updates).

Add a new object which serves as a queue for patch to direct-apply,
with support for either text patches (udiff style out of git show or
format-patch) or commits to cherry-pick. In the former case, the part
of the show / format-patch before the diff itself is used for the
commit metadata (author, committer, dates, message) whereas for the
commit version the commit itself is reused as-is.

Applied patches are simply disabled for traceability.

Fixes #926
2024-10-03 12:06:00 +02:00

163 lines
6.1 KiB
XML

<odoo>
<!--
Queues mergebot menu: contains various list views inspecting the cron tasks
(mostly)
-->
<record id="action_splits" model="ir.actions.act_window">
<field name="name">Splits</field>
<field name="res_model">runbot_merge.split</field>
</record>
<record id="tree_splits" model="ir.ui.view">
<field name="name">Splits</field>
<field name="model">runbot_merge.split</field>
<field name="arch" type="xml">
<tree>
<field name="id"/>
<field name="target"/>
</tree>
</field>
</record>
<record id="action_feedback" model="ir.actions.act_window">
<field name="name">Feedback</field>
<field name="res_model">runbot_merge.pull_requests.feedback</field>
</record>
<record id="tree_feedback" model="ir.ui.view">
<field name="name">Feedback</field>
<field name="model">runbot_merge.pull_requests.feedback</field>
<field name="arch" type="xml">
<tree>
<field name="repository"/>
<field name="pull_request"/>
<field name="message"/>
<field name="close"/>
</tree>
</field>
</record>
<record id="action_tagging" model="ir.actions.act_window">
<field name="name">Tagging</field>
<field name="res_model">runbot_merge.pull_requests.tagging</field>
</record>
<record id="tree_tagging" model="ir.ui.view">
<field name="name">Tagging</field>
<field name="model">runbot_merge.pull_requests.tagging</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="repository"/>
<field name="pull_request"/>
<field name="tags_add"/>
<field name="tags_remove"/>
</tree>
</field>
</record>
<record id="action_fetches" model="ir.actions.act_window">
<field name="name">PRs to fetch</field>
<field name="res_model">runbot_merge.fetch_job</field>
<field name="view_mode">tree</field>
<field name="context">{'default_active': True}</field>
</record>
<record id="search_fetches" model="ir.ui.view">
<field name="name">Fetches Search</field>
<field name="model">runbot_merge.fetch_job</field>
<field name="arch" type="xml">
<search>
<filter string="Active" name="active"
domain="[('active', '=', True)]"/>
<field name="repository"/>
<field name="number"/>
</search>
</field>
</record>
<record id="tree_fetches" model="ir.ui.view">
<field name="name">Fetches Tree</field>
<field name="model">runbot_merge.fetch_job</field>
<field name="arch" type="xml">
<tree>
<field name="repository"/>
<field name="number"/>
</tree>
</field>
</record>
<record id="action_patches" model="ir.actions.act_window">
<field name="name">Patches</field>
<field name="res_model">runbot_merge.patch</field>
</record>
<record id="search_patch" model="ir.ui.view">
<field name="name">Patches Search</field>
<field name="model">runbot_merge.patch</field>
<field name="arch" type="xml">
<search>
<filter string="Inactive" name="active" domain="[('active', '=', False)]"/>
<field name="target"/>
<field name="repository"/>
</search>
</field>
</record>
<record id="tree_patch" model="ir.ui.view">
<field name="name">Patches List</field>
<field name="model">runbot_merge.patch</field>
<field name="arch" type="xml">
<tree>
<field name="id"/>
<field name="repository"/>
<field name="target"/>
</tree>
</field>
</record>
<record id="form_patch" model="ir.ui.view">
<field name="name">Patches Form</field>
<field name="model">runbot_merge.patch</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="repository"/>
<field name="target"/>
</group>
<group>
<field name="active"/>
</group>
</group>
<group attrs="{'invisible': [
('commit', '=', False),
('patch', '!=', False),
]}">
<group colspan="4">
<field name="commit"/>
</group>
</group>
<group attrs="{'invisible': [
('patch', '=', False),
('commit', '!=', False),
]}">
<group colspan="4">
<field name="format" colspan="4"/>
<field name="patch" widget="ace"/>
<!-- no diff/patch mode support -->
<!-- options="{'mode': 'patch'}"/> -->
<field name="message" colspan="4"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<menuitem name="Queues" id="menu_queues" parent="runbot_merge_menu">
<menuitem name="Splits" id="menu_queues_splits"
action="action_splits"/>
<menuitem name="Feedback" id="menu_queues_feedback"
action="action_feedback"/>
<menuitem name="Tagging" id="menu_queues_tagging"
action="action_tagging"/>
<menuitem name="Fetches" id="menu_fetches"
action="action_fetches"/>
<menuitem name="Patches" id="menu_patches"
action="action_patches"/>
</menuitem>
</odoo>