Skip to content

Commit

Permalink
Merge pull request #174 from acsone/fix-mention_maintainers
Browse files Browse the repository at this point in the history
Fix mention maintainers
  • Loading branch information
sbidoul authored Apr 3, 2022
2 parents da66e24 + 976b94d commit c179fca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/oca_github_bot/tasks/mention_maintainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright 2019 Simone Rubino - Agile Business Group
# Distributed under the MIT License (http://opensource.org/licenses/MIT).
from pathlib import Path

from .. import config, github
from ..config import switchable
Expand Down Expand Up @@ -87,10 +86,10 @@ def get_adopt_mention(pr_opener):
def get_maintainers(addon_dirs):
"""Get maintainer for each addon in `addon_dirs`.
:return: Dictionary {Path('addon_dir'): <list of addon's maintainers>}
:return: Dictionary {'addon_dir': <list of addon's maintainers>}
"""
addon_maintainers_dict = dict()
for addon_dir in addon_dirs:
maintainers = get_manifest(addon_dir).get("maintainers", [])
addon_maintainers_dict.setdefault(Path(addon_dir), maintainers)
addon_maintainers_dict.setdefault(addon_dir, maintainers)
return addon_maintainers_dict
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


@router.register("pull_request", action="opened")
@router.register("pull_request", action="reopened")
async def on_pr_open_mention_maintainer(event, *args, **kwargs):
"""
Whenever a PR is opened, mention the maintainers of modified addons.
Expand Down

0 comments on commit c179fca

Please sign in to comment.