Skip to content

[ADD] migration_pr_check: Remind migration guidelines - #363

Open
SirPyTech wants to merge 1 commit into
OCA:masterfrom
PyTech-SRL:imp-issue159
Open

SirPyTech wants to merge 1 commit into
OCA:masterfrom
PyTech-SRL:imp-issue159

Conversation

@SirPyTech

Copy link
Copy Markdown

Superseding #220 because https://github.com/SirTakobi is no more active.

@HekkiMelody HekkiMelody left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review, LGTM

Comment thread src/oca_github_bot/config.py Outdated

@legalsylvain legalsylvain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@SirPyTech
SirPyTech marked this pull request as draft September 22, 2026 11:56
@SirPyTech
SirPyTech marked this pull request as ready for review September 22, 2026 11:58

@rousseldenis rousseldenis left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems great! Thanks!

@rousseldenis

Copy link
Copy Markdown

@OCA/core-maintainers

@rousseldenis

Copy link
Copy Markdown

@SirPyTech Do you have studied the possibility to add the migration tag on the PR too ?

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Comment thread src/oca_github_bot/config.py Outdated
@SirPyTech

Copy link
Copy Markdown
Author

@SirPyTech Do you have studied the possibility to add the migration tag on the PR too ?

Thanks for having a look!
No because that and other PR management tasks are already in the ocabot migration command.
This PR's purpose is to add a little automated guidance to the contributor proposing a migration.

@SirPyTech
SirPyTech requested a review from hbrunn October 8, 2026 07:54

@hbrunn hbrunn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...but given you detect which module is added anyways, wouldn't it be great if the bot writes

/ocabot migration $module

too? I think it has write permissions, so this should actually work.

I can imagine some other stuff I'd like to see eventually, like actually enforcing all of the module's commits exist in the PR, but that would be future extensions I think.

Comment thread src/oca_github_bot/tasks/migration_pr_check.py Outdated
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @hbrunn. Your command failed:

Invalid options for command migration: .

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@OCA OCA deleted a comment from OCA-git-bot Oct 9, 2026
Comment thread src/oca_github_bot/tasks/migration_pr_check.py Outdated
@legalsylvain

Copy link
Copy Markdown
Collaborator

...but given you detect which module is added anyways, wouldn't it be great if the bot writes

this could save a lot of time for PSC ! 👍 if it's possible easily.

@etobella

Copy link
Copy Markdown
Member

...but given you detect which module is added anyways, wouldn't it be great if the bot writes

this could save a lot of time for PSC ! 👍 if it's possible easily.

Another benefit is that bot is able to detect easily if another migration exists 🤔

@SirPyTech SirPyTech left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...but given you detect which module is added anyways, wouldn't it be great if the bot writes

/ocabot migration $module

too? I think it has write permissions, so this should actually work.

...but given you detect which module is added anyways, wouldn't it be great if the bot writes

this could save a lot of time for PSC ! 👍 if it's possible easily.

Right now the message is completely static so it would require a bit of refactoring.
I'd also like to see how adding this simple comment performs before adding active features.

Comment thread src/oca_github_bot/tasks/migration_pr_check.py Outdated
Comment thread src/oca_github_bot/tasks/migration_pr_check.py Outdated
@SirPyTech
SirPyTech requested a review from hbrunn October 12, 2026 07:51
@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@legalsylvain

legalsylvain commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

/ocabot merge nobump

Edit, I'll deploy in my server to make a test, before merging.

@legalsylvain

Copy link
Copy Markdown
Collaborator

hi @SirPyTech. I deployed in GRAP production. The bot doesn't write a comment. Did I missed something ?

grap/grap-odoo-incubator#235

Thanks for your help !

@SirPyTech

Copy link
Copy Markdown
Author

hi @SirPyTech. I deployed in GRAP production. The bot doesn't write a comment. Did I missed something ?

grap/grap-odoo-incubator#235

Thanks for your help !

The PR's title has [MIG] so it should be detected as a migration, maybe you have switched on only some tasks and not the new one? The task has the usual decorator @switchable("comment_migration_guidelines").

You can also try setting a message explicitly with the environment variable MIGRATION_GUIDELINES_REMINDER.

@legalsylvain

Copy link
Copy Markdown
Collaborator

here is the configuration.
the rebase_bot, mention_maintainer, merge_bot are working for the time being, so comment_migration_guidelines should work also. Don't you think ?

# Coma separated list of task to run
# By default all configured tasks are run.
# Available tasks:
#  delete_branch,tag_approved,tag_ready_to_merge,gen_addons_table,
#  gen_addons_readme,gen_addons_icon,setuptools_odoo,mention_maintainer,
#  merge_bot,rebase_bot,merge_bot_towncrier,tag_needs_review
#BOT_TASKS=all

# Coma separated list of task to ignore
BOT_TASKS_DISABLED=gen_addons_icon,setuptools_odoo

@SirPyTech

Copy link
Copy Markdown
Author

here is the configuration. the rebase_bot, mention_maintainer, merge_bot are working for the time being, so comment_migration_guidelines should work also. Don't you think ?

# Coma separated list of task to run
# By default all configured tasks are run.
# Available tasks:
#  delete_branch,tag_approved,tag_ready_to_merge,gen_addons_table,
#  gen_addons_readme,gen_addons_icon,setuptools_odoo,mention_maintainer,
#  merge_bot,rebase_bot,merge_bot_towncrier,tag_needs_review
#BOT_TASKS=all

# Coma separated list of task to ignore
BOT_TASKS_DISABLED=gen_addons_icon,setuptools_odoo

Yes based on that configuration I think it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants