runbot/runbot_merge/models
Xavier Morel 7f7589c50e [FIX] runbot_merge: normalisation of patches before parsing
- Apparently if a user is on windows the ACE editor can swap out their
  line end from unix to windows. The patch parsers were predicated
  upon all patches being in unix mode (because git, and diff).

  Fixup both parsers to convert windows-style line end to unix before
  trying to parse the patch data. Also add a few fallbacks to limit
  the odds of an unhelpful `StopIteration` (though that might hide
  errors more than reveal them...)
- Make sure we support `format-patch --no-signature`, just requires
  using the correct partition direction: I assume I used `rpartition`
  as a form of micro-optimisation *but*

  - If the separator is not found the "patch body" ends up in the
    third parameter rather than the first, which makes the fallback
    difficult.
  - There doesn't seem to be anything preventing *multiple* signature
    separators in a message, and logically the first one should hold
    and the rest is all part of the signature.

  As a result, for both reasons we need to look *forwards* for the
  signature separator, not backwards. Hence `str.partition`.

Fixes #992
2024-12-02 16:32:53 +01:00
..
backport [FIX] runbot_merge: backport wizard 2024-11-18 09:48:48 +01:00
crons [IMP] runbot_merge: prune repo during maintenance 2024-08-05 09:03:39 +02:00
project_freeze [REM] runbot_merge: freeze wizard auto-refresh 2024-12-02 16:32:53 +01:00
staging_cancel [ADD] runbot_merge: stagings canceling wizard 2022-12-08 10:46:22 +01:00
__init__.py [MERGE] runbot_merge, forwardport: latest updates 2024-11-19 12:18:59 +01:00
batch.py [MERGE] runbot_merge, forwardport: latest updates 2024-11-19 12:18:59 +01:00
commands.py [FIX] *: UX around fw=no 2024-09-17 11:31:20 +02:00
events_sources.py [ADD] *: per-repository webhook secret 2024-06-06 11:07:57 +02:00
ir_actions.py [IMP] runbot_merge: add json & requests to server actions context 2023-02-20 10:13:05 +01:00
ir_ui_view.py [IMP] runbot_merge: suppress view validation warning 2024-09-27 12:53:51 +02:00
mail_thread.py [MERGE] bot from 16.0 to 17.0 2024-08-12 13:13:03 +02:00
patcher.py [FIX] runbot_merge: normalisation of patches before parsing 2024-12-02 16:32:53 +01:00
project.py [MERGE] runbot_merge, forwardport: latest updates 2024-11-20 08:05:41 +01:00
pull_requests.py [FIX] runbot_merge: tracking author is already a res.partner 2024-11-20 12:33:00 +01:00
res_partner.py [MERGE] bot from 16.0 to 17.0 2024-08-12 13:13:03 +02:00
stagings_create.py [CHG] runbot_merge: make merge method non-blocking 2024-10-07 08:07:59 +02:00
utils.py [FIX] runbot_merge: reset markdown renderer 2024-10-29 13:13:59 +01:00