OCA / oca-github-bot

The GitHub Bot of the Odoo Community Association (OCA)
MIT License
39 stars 57 forks source link

ocabot migration duplicating lines in migration issue? #214

Closed sbidoul closed 1 year ago

sbidoul commented 1 year ago

See for example https://github.com/OCA/server-env/issues/120 where the issue was created correctly but now lines with references to a PR are duplicated.

pedrobaeza commented 1 year ago

I have observed it in some cases, but I'm not able to deduce what is reason. A problem in the regex?

sbidoul commented 1 year ago

Another example: https://github.com/OCA/partner-contact/issues/1353

eLBati commented 1 year ago

Something similar is still happening:

https://github.com/OCA/l10n-italy/pull/3026#issuecomment-1311379301 produced

image

SirTakobi commented 1 year ago

Something similar is still happening:

OCA/l10n-italy#3026 (comment) produced

image

That is because the alphabetical order of modules is checked in https://github.com/OCA/oca-github-bot/blob/44ad4a5be6c19f3722566bd1082b880c003e6910/src/oca_github_bot/tasks/migration_issue_bot.py#L60: when the bot reads l10n_it_ipa, it adds (before l10n_it_ipa) the l10n_it_declaration_of_intent line because 'l10n_it_ipa' > 'l10n_it_declaration_of_intent'.

TL;DR: the bot misbehaves when the modules are not written in alphabetical order, should we fix it?

pedrobaeza commented 1 year ago

It's not the same. This bot command assumes an alphabetical order in the migration issue, which is not the case.

pedrobaeza commented 1 year ago

You should order the modules IMO instead of over-complicating the bot.

eLBati commented 1 year ago

Thanks, ordered