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

[ADD] add 'OCA/repository' as category when sorting addons coming from OCA #15

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnizR
Copy link
Collaborator

@AnizR AnizR commented Oct 26, 2024

Issue

Description

Instead of having every OCA addon under the category '#OCA', it sorts by github repository (e.g. #OCA/account-payment)

@AnizR AnizR linked an issue Oct 26, 2024 that may be closed by this pull request
@AnizR
Copy link
Collaborator Author

AnizR commented Oct 26, 2024

ping @marielejeune @qgroulard

--oca-category Add category for third party addons coming from OCA.
The category is set as 'OCA/repository_name'.
If the repository can not be identified,
it falls into the default 'OCA' category.
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice if we could have the grouping by OCA repo optional, as I personally prefer to have a single category for OCA.


if not repo_url:
return None
return search("OCA/.*", repo_url).group()
Copy link
Member

@sbidoul sbidoul Oct 26, 2024

Choose a reason for hiding this comment

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

Suggested change
return search("OCA/.*", repo_url).group()
return re.search("OCA/.*", repo_url).group()

When the function name is generic like that, I find it easier to have the module name here. I actually had to scroll up to understand what search was here.

Also take care that re.search can return None.

@AnizR AnizR marked this pull request as draft October 28, 2024 07:12
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.

Sort by repo of OCA
2 participants