runbot/runbot_merge/models
Xavier Morel bbce5f8f46 [IMP] *: don't remove PRs from batches on close
Initially wanted to skip this only for FW PRs, but after some thinking
I feel this info could still be valuable even for non-fw PRs which
were never merged in the first place.

Requires a few adjustments to not break *everything*: `batch.prs`
excludes closed PRs by default as most processes only expect to be
faced by a closed PR inside a batch, and we *especially* want to avoid
that before the batch is merged (as we'd risk staging a closed PR).

However since PRs don't get removed from batches anymore (and batches
don't get deleted when they have no PRs) we now may have a bunch of
batches whose PRs (usually a single one) are all closed, this has two
major side-effects:

- a new PR may get attached to an old batch full of closed PRs (as
  batches are filtered out on being *merged*), which is weird
- the eventual list of batches gets polluted with a bunch of
  irrelevant batches which are hard to filter out

The solution is to reintroduce an `active` field, as a stored compute
field based on the state of batch PRs. This way if all PRs of a batch
are closed it switches to inactive, and is automatically filtered out
by search which solves both issues.
2024-05-29 07:55:07 +02:00
..
crons [FIX] runbot_merge: maintenance gc command 2024-02-26 09:58:22 +01:00
project_freeze [CHG] runbot_merge: move staging readiness to batch 2024-05-23 07:58:58 +02:00
staging_cancel [ADD] runbot_merge: stagings canceling wizard 2022-12-08 10:46:22 +01:00
__init__.py [CHG] *: persistent batches 2024-05-23 07:58:58 +02:00
batch.py [IMP] *: don't remove PRs from batches on close 2024-05-29 07:55:07 +02:00
commands.py [FIX] runbot_merge: handling of staging cancellation 2024-05-23 07:58:58 +02:00
ir_actions.py [IMP] runbot_merge: add json & requests to server actions context 2023-02-20 10:13:05 +01:00
project.py [CHG] *: move forward-porting over to batches 2024-05-24 09:08:56 +02:00
pull_requests.py [IMP] *: don't remove PRs from batches on close 2024-05-29 07:55:07 +02:00
res_partner.py [ADD] runbot_merge: ad-hoc ACL tracking to res.partner 2024-05-16 09:32:03 +02:00
stagings_create.py [IMP] runbot_merge: preserve batch ordering in stagings 2024-05-29 07:55:07 +02:00
utils.py [CHG] runbot_merge: move priority field from PR to batch 2024-05-23 07:58:58 +02:00