5
0
mirror of https://github.com/odoo/runbot.git synced 2025-03-21 18:35:45 +07:00
runbot/runbot_merge/views/configuration.xml
Xavier Morel fec3d39d19 [ADD] *: per-repository webhook secret
Currently webhook secrets are configured per *project* which is an
issue both because different repositories may have different
administrators and thus creates safety concerns, and because multiple
repositories can feed into different projects (e.g. on mergebot,
odoo-dev/odoo is both an ancillary repository to the main RD project,
and the main repository to the minor / legacy master-wowl
project). This means it can be necessary to have multiple projects
share the same secret as well, this then mandates the secret for more
repositories per (1).

This is a pain in the ass, so just detach secrets from projects and
link them *only* to repositories, it's cleaner and easier to manage
and set up progressively.

This requires a lot of changes to the tests, as they all need to
correctly configure the signaling.

For `runbot_merge` there was *some* setup sharing already via the
module-level `repo` fixtures`, those were merged into a conftest-level
fixture which could handle the signaling setup. A few tests which
unnecessarily set up repositories ad-hoc were also moved to the
fixture. But for most of the ad-hoc setup in `runbot_merge`, as well
as `forwardport` where it's all ad-hoc, events sources setup was just
appended as is. This should probably be cleaned up at one point, with
the various requirements collected and organised into a small set of
fixtures doing the job more uniformly.

Fixes 
2024-06-06 11:07:57 +02:00

92 lines
3.6 KiB
XML

<odoo>
<record id="action_overrides" model="ir.actions.act_window">
<field name="name">CI / statuses overrides</field>
<field name="res_model">res.partner.override</field>
</record>
<record id="tree_overrides" model="ir.ui.view">
<field name="name">Overrides List</field>
<field name="model">res.partner.override</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="context"/>
<field name="repository_id"/>
<field name="partner_ids" widget="many2many_tags"/>
</tree>
</field>
</record>
<record id="action_review" model="ir.actions.act_window">
<field name="name">Review Rights</field>
<field name="res_model">res.partner.review</field>
<field name="context">{'search_default_group_by_repository': True}</field>
</record>
<record id="tree_review" model="ir.ui.view">
<field name="name">Review Rights</field>
<field name="model">res.partner.review</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="repository_id"/>
<field name="partner_id"/>
<field name="review"/>
<field name="self_review"/>
</tree>
</field>
</record>
<record id="action_feedback" model="ir.actions.act_window">
<field name="name">Feedback Templates tree</field>
<field name="res_model">runbot_merge.pull_requests.feedback.template</field>
</record>
<record id="tree_feedback" model="ir.ui.view">
<field name="name">Feedback Templates</field>
<field name="model">runbot_merge.pull_requests.feedback.template</field>
<field name="arch" type="xml">
<tree>
<field name="template"/>
<field name="help"/>
</tree>
</field>
</record>
<record id="form_feedback" model="ir.ui.view">
<field name="name">Feedback Templates form</field>
<field name="model">runbot_merge.pull_requests.feedback.template</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="help"/>
<field name="template"/>
</sheet>
<div class="oe_chatter">
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="action_events_sources" model="ir.actions.act_window">
<field name="name">Events Sources</field>
<field name="res_model">runbot_merge.events_sources</field>
</record>
<record id="tree_events_sources" model="ir.ui.view">
<field name="name">Events Sources List</field>
<field name="model">runbot_merge.events_sources</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="repository"/>
<field name="secret"/>
</tree>
</field>
</record>
<menuitem name="Configuration" id="menu_configuration" parent="runbot_merge_menu">
<menuitem name="CI Overrides" id="menu_configuration_overrides"
action="action_overrides"/>
<menuitem name="Review Rights" id="menu_configuration_review"
action="action_review"/>
<menuitem name="Feedback Templates" id="menu_configuration_feedback"
action="action_feedback"/>
<menuitem name="Events Sources" id="menu_configuration_events_sources"
action="action_events_sources"/>
</menuitem>
</odoo>