Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] do not use MAIN_BRANCHES anymore #601

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

remi-filament
Copy link
Contributor

Fixes

This PR tends to fix the issue that 17.0 branch are not taken into account by oca_projects.py get_repositories_and_branches function causing for instance that these are not created in Weblate (see https://odoo-community.org/groups/contributors-15/contributors-1545495).

The script used for populating weblate is calling that function which does not return v17.0 branch (https://github.com/OCA/oca-weblate-deployment/blob/75ad176738d15ac2d99aaf0311e31036e39e74d9/wocg-oca#L12C21-L12C50)

According to #539 MAIN_BRANCHES was deprecated and should not be used anymore, so I remove it from default parameter.

With this change, 17.0 branches are properly returned.

@remi-filament
Copy link
Contributor Author

Hi @sbidoul do you mind having a look at this PR that should fix the missing 17.0 branches in Weblate ?

Best Regards !

@sbidoul
Copy link
Member

sbidoul commented Jan 19, 2024

Thanks for taking care about this.

I worry this change will break things, as it will expose non-main branches such as the merge bot branches.

Would it make sense to pass branches=() in the weblate script, together with a branch_filter function ?
There is such a filter in the bot: https://github.com/OCA/oca-github-bot/blob/a364253511c15a6d7e0bf6e60cba973481fb9cbd/src/oca_github_bot/version_branch.py#L20-L26

@remi-filament
Copy link
Contributor Author

I have added the use of is_main_branch function in branch_filter by default in the function.
Is that not the purpose of this is_main_branch to ensure that only main branches are taken into account ?

I do not see that much of a risk, but I do not have your level of knowledge so I trust you on that !
Should I update the list of version to add 17.0 in config.py instead ?

@sbidoul
Copy link
Member

sbidoul commented Jan 19, 2024

Ah yes, I see it now 🤦

And the MAIN_BRANCHES global is already deprecated. So let's remove it completely if we stop maintaining it?

While you are at it let's drop 8, 9, 10 here ?

@remi-filament
Copy link
Contributor Author

Alright, I just removed MAIN_BRANCHES variable from config.py as well !
Sure, I will update the weblate deployment repo as well.

@sbidoul
Copy link
Member

sbidoul commented Jan 19, 2024

BTW (not for this PR), we can also drop OCA_PROJECTS, since it is completely out of date.
The source of truth for this (if one does not want to use the GitHub API) is in https://github.com/OCA/repo-maintainer-conf.

@remi-filament
Copy link
Contributor Author

BTW (not for this PR), we can also drop OCA_PROJECTS, since it is completely out of date. The source of truth for this (if one does not want to use the GitHub API) is in https://github.com/OCA/repo-maintainer-conf.

I was looking into it, but OCA_PROJECTS is used in check_contrib script.
Before trying to update check_contrib to get it working with OCA_PROJECTS, maybe you can confirm that check_contrib is still needed (otherwise I can simply remove that script as well) ?

@sbidoul sbidoul merged commit feddb7a into OCA:master Jan 19, 2024
6 checks passed
@sbidoul
Copy link
Member

sbidoul commented Jan 19, 2024

confirm that check_contrib is still needed

I don't know. Never used it myself. You can perhaps simply replace OCA_PROJECT by get_repositories() in that script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants