Maintainer workflows discussions
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	workflows@vger.kernel.org, Dan Williams <djbw@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: [PATCH v2 06/11] docs: maintainers_include: add external profile URLs
Date: Fri, 17 Apr 2026 08:11:16 +0200	[thread overview]
Message-ID: <b1ac2fcb4e6eecb138291e06efe11142a0bea47d.1776405189.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1776405189.git.mchehab+huawei@kernel.org>

Some subsystem profiles are maintained elsewhere. Add them to
the output.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/sphinx/maintainers_include.py | 28 +++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sphinx/maintainers_include.py
index cf428db7599c..f1b8d4b00c2a 100755
--- a/Documentation/sphinx/maintainers_include.py
+++ b/Documentation/sphinx/maintainers_include.py
@@ -37,6 +37,7 @@ class MaintainersParser:
 
     def __init__(self, base_path, path):
         self.profiles = {}
+        self.profile_urls = {}
 
         result = list()
         result.append(".. _maintainers:")
@@ -81,6 +82,16 @@ class MaintainersParser:
                     else:
                         self.profiles[fname] += f", {subsystem_name}"
 
+            match = re.match(r"P:\s*(https?://.*)", line)
+            if match:
+                url = match.group(1).strip()
+                if url not in self.profile_urls:
+                    if self.profile_urls.get(url) is None:
+                        self.profile_urls[url] = subsystem_name
+                    else:
+                        self.profile_urls[url] += f", {subsystem_name}"
+
+
             # Linkify all non-wildcard refs to ReST files in Documentation/.
             pat = r'(Documentation/([^\s\?\*]*)\.rst)'
             m = re.search(pat, line)
@@ -219,18 +230,31 @@ class MaintainersProfile(Include):
     def emit(self, base_path, path):
         """Parse all the MAINTAINERS lines looking for profile entries"""
 
-        profiles = MaintainersParser(base_path, path).profiles
+        maint = MaintainersParser(base_path, path)
 
         output  = ".. toctree::\n"
         output += "   :maxdepth: 2\n\n"
 
-        items = sorted(profiles.items(), key=lambda kv: (kv[1] or "", kv[0]))
+        items = sorted(maint.profiles.items(),
+                       key=lambda kv: (kv[1] or "", kv[0]))
         for fname, profile in items:
             if profile:
                 output += f"   {profile} <{fname}>\n"
             else:
                 output += f"   {fname}\n"
 
+        output += "\n**External profiles**\n\n"
+
+        items = sorted(maint.profile_urls.items(),
+                       key=lambda kv: (kv[1] or "", kv[0]))
+        for url, profile in items:
+            if profile:
+                output += f"- {profile} <{url}>\n"
+            else:
+                output += f"- {url}\n"
+
+        output += "\n"
+
         self.state_machine.insert_input(statemachine.string2lines(output), path)
 
     def run(self):
-- 
2.53.0


  parent reply	other threads:[~2026-04-17  6:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17  6:11 [PATCH v2 00/11] Auto-generate maintainer profile entries Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 01/11] MAINTAINERS: add an entry for media maintainers profile Mauro Carvalho Chehab
2026-04-19  0:02   ` Randy Dunlap
2026-04-19 19:07     ` Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 02/11] MAINTAINERS: add maintainer-tip.rst to X86 Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 03/11] docs: maintainers_include: auto-generate maintainer profile TOC Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 04/11] docs: auto-generate maintainer entry profile links Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 05/11] docs: maintainers_include: use a better title for profiles Mauro Carvalho Chehab
2026-04-17  6:11 ` Mauro Carvalho Chehab [this message]
2026-04-17  6:11 ` [PATCH v2 07/11] docs: maintainers_include: preserve names for files under process/ Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 08/11] docs: maintainers_include: Only show main entry for profiles Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 09/11] docs: maintainers_include: improve its output Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 10/11] docs: maintainers_include: fix support for O=dir Mauro Carvalho Chehab
2026-04-17  6:11 ` [PATCH v2 11/11] docs: maintainers_include: parse MAINTAINERS just once Mauro Carvalho Chehab
2026-04-19  0:05 ` [PATCH v2 00/11] Auto-generate maintainer profile entries Randy Dunlap
2026-04-19 19:04   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1ac2fcb4e6eecb138291e06efe11142a0bea47d.1776405189.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=djbw@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox