runbot/forwardport
Xavier Morel 8d7d6302d3 [FIX] runbot_merge: make freeze wizard labels lookup not shit
I DECLARE BANKRUPTCY!!!

The previous implementation of labels lookup was really not
intuitive (it was just a char field, and matched labels by equality
including the owner tag), and was also full of broken edge
cases (e.g. traceback if a label matched multiple PRs in the same repo
because people reuse branch names).

Tried messing about with contextual `display_name` and `name_search`
on PRs but the client goes wonky in that case, and there is no clean
autocomplete for non-relational fields.

So created a view which reifies labels, and that can be used as the
basis for our search. It doesn't have to be maintained by hand, can be
searched somewhat flexibly, we can add new view fields in the future
if desirable, and it seems to work fine providing a nice
understandable UX, with the reliability of using a normal Odoo model
the normal way.

Also fixed the handling of bump PRs, clearly clearing the entire field
before trying to update existing records (even with a link_to
inbetween) is not the web client's fancy, re-selecting the current
label would just empty the thing entirely.

So use a two-step process slightly closer to the release PRs instead:

- first update or delete the existing bump PRs
- then add the new ones

The second part is because bump PRs are somewhat less critical than
release, so it can be a bit more DWIM compared to the more deliberate
process of release PRs where first the list of repositories involved
has to be set up just so, then the PRs can be filled in each of them.

Fixes #697
2023-01-25 12:25:45 +01:00
..
changelog [FIX] *: fix forward port inserter if last branch is disabled 2022-12-01 10:57:32 +01:00
data [IMP] forwardport: store and display detachment reason 2023-01-19 14:23:41 +01:00
migrations [IMP] forwardport: store and display detachment reason 2023-01-19 14:23:41 +01:00
models [FIX] runbot_merge: sync PR target and message on check 2023-01-25 12:25:45 +01:00
tests [FIX] runbot_merge: make freeze wizard labels lookup not shit 2023-01-25 12:25:45 +01:00
__init__.py [ADD] mergebot, forwardbot: changelog 2021-10-20 15:16:48 +02:00
__manifest__.py [IMP] forwardport: store and display detachment reason 2023-01-19 14:23:41 +01:00
controllers.py [ADD] mergebot, forwardbot: changelog 2021-10-20 15:16:48 +02:00