OCA / oca-github-bot

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

[ADD] migration_pr_check: Remind migration guidelines #220

Closed SirTakobi closed 11 months ago

SirTakobi commented 1 year ago

Possible implementation of #159: this always adds a comment about migration guidelines when the PR is identified as a migration PR.

The result is in https://github.com/SirTakobi/l10n-italy/pull/28

legalsylvain commented 1 year ago

Hi @SirTakobi just reviewed your code. LGTM. Just one question : to know if a PR is a migration one, you parse the related issue. That's great but in my opinion not complete. i think we could also guess it's a migration PR if the title contains "[MIG]" or " mig ". (many times, the issue "Migration in version 16.0" is not updated.

What do you think ?

SirTakobi commented 1 year ago

Hi @SirTakobi just reviewed your code. LGTM. Just one question : to know if a PR is a migration one, you parse the related issue. That's great but in my opinion not complete. i think we could also guess it's a migration PR if the title contains "[MIG]" or " mig ". (many times, the issue "Migration in version 16.0" is not updated.

What do you think ?

Thanks for having a look! I added a check on the PR Title with its test; it is mocking more than I'd like to, but I think there is no other way to make it work. I also fixed a false positive in another test.

pre-commit is failing while building isort's virtual Environment, I suppose it will be fixed after https://github.com/OCA/oca-github-bot/pull/229