You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ak...@apache.org on 2026/07/11 00:49:06 UTC

(tooling-agents) branch main updated: Fix maintainer count for foundation/org-named packages

This is an automated email from the ASF dual-hosted git repository.

andrewmusselman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-agents.git


The following commit(s) were added to refs/heads/main by this push:
     new 7764748  Fix maintainer count for foundation/org-named packages
7764748 is described below

commit 7764748fa9b46913f3ab7cbaeee6dc42d6962ee0
Author: Andrew Musselman <ak...@apache.org>
AuthorDate: Fri Jul 10 17:48:56 2026 -0700

    Fix maintainer count for foundation/org-named packages
    
    PyPI, npm, and crates.io now use max(registry_count,
    total_contributors) matching Go/Maven/RubyGems. Prevents
    org names like 'Pallets' or 'NumPy Developers' from counting
    as 1 maintainer when the GitHub repo has 30 contributors.
---
 gha-review/agents/gha_bernies.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gha-review/agents/gha_bernies.py b/gha-review/agents/gha_bernies.py
index cfa3509..9f6d651 100644
--- a/gha-review/agents/gha_bernies.py
+++ b/gha-review/agents/gha_bernies.py
@@ -354,7 +354,7 @@ async def run(input_dict, tools):
                     'name': pkg,
                     'ecosystem': 'pypi',
                     'version': info.get('version', '?'),
-                    'maintainer_count': len(people) if people else 1,
+                    'maintainer_count': max(len(people), total_contributors) if max(len(people), total_contributors) > 0 else 1,
                     'maintainers': sorted(list(people))[:5],
                     'home_page': info.get('home_page', '') or '',
                     'source_repo': source_url,
@@ -392,7 +392,7 @@ async def run(input_dict, tools):
                     'name': pkg,
                     'ecosystem': 'npm',
                     'version': latest,
-                    'maintainer_count': len(maintainers),
+                    'maintainer_count': max(len(maintainers), total_contributors) if max(len(maintainers), total_contributors) > 0 else 1,
                     'maintainers': [m.get('name', '?') for m in maintainers[:5]],
                     'source_repo': f"https://github.com/{gh_repo}" if gh_repo else str(repo_url),
                     'total_contributors': total_contributors,
@@ -434,7 +434,7 @@ async def run(input_dict, tools):
                     'name': pkg,
                     'ecosystem': 'crates.io',
                     'version': crate.get('newest_version', '?'),
-                    'maintainer_count': len(owners),
+                    'maintainer_count': max(len(owners), total_contributors) if max(len(owners), total_contributors) > 0 else 1,
                     'maintainers': [o.get('login', '?') for o in owners[:5]],
                     'source_repo': f"https://github.com/{gh_repo}" if gh_repo else repo_url,
                     'total_contributors': total_contributors,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org