From: Thomas Monjalon <thomas@monjalon.net>
To: alialnu@nvidia.com
Cc: ci@dpdk.org, jerinj@marvell.com, ferruh.yigit@intel.com,
david.marchand@redhat.com, juraj.linkes@pantheon.tech
Subject: Re: [dpdk-ci] [PATCH v2 04/10] tools: add functionality for detecting tree maintainers
Date: Thu, 30 Sep 2021 10:29:54 +0200 [thread overview]
Message-ID: <6750166.sAAn6ldZEP@thomas> (raw)
In-Reply-To: <20210921143542.4412-5-alialnu@nvidia.com>
21/09/2021 16:35, alialnu@nvidia.com:
> From: Ali Alnubani <alialnu@nvidia.com>
>
> Detecting a maintainer works by searching the
> 'General Project Administration' section for subsections
> containing the provided tree, and then returning the maintainers
> specified in that subsection.
>
> Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
> ---
> @@ -118,6 +120,7 @@ class Maintainers(object):
>
> file_regex = r'F:\s(.*)'
> tree_regex = r'T: (?P<url>git:\/\/dpdk\.org(?:\/next)*\/(?P<name>.*))'
> + maintainer_regex = r'M:\s(.*)'
> section_regex = r'([^\n]*)\n-+.*?(?=([^\n]*\n-+)|\Z)'
> subsection_regex = r'[^\n](?:(?!\n{{2}}).)*?^{}: {}$(?:(?!\n{{2}}).)*'
>
> @@ -141,6 +144,26 @@ class Maintainers(object):
> # Save already matched patterns.
> self.matched = {}
>
> + def get_maintainers(self, tree):
> + """
> + Return a list of a tree's maintainers."""
> + maintainers = []
> + for section in self.sections:
> + if section.group(1) == 'General Project Administration':
Should this constant string be declared above with other regex?
> + # Find the block containing the tree.
> + regex = self.subsection_regex.format('T', re.escape(tree))
> + subsection_match = re.findall(
> + regex,
> + section.group(0),
> + re.DOTALL | re.MULTILINE)
> + if len(subsection_match):
> + subsection = subsection_match[-1]
> + # Look for maintainers
> + maintainers = re.findall(
> + self.maintainer_regex, subsection)
> + return maintainers
> + break
next prev parent reply other threads:[~2021-09-30 8:29 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 15:45 [dpdk-ci] [PATCH 0/9] Automatic patchwork delegation Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 1/9] tools: rename guess_git_tree script Ali Alnubani
2021-09-07 11:03 ` Juraj Linkeš
2021-09-08 16:54 ` Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 2/9] tools: match by tree url instead of tree name Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 3/9] tools: update script usage Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 4/9] tools: add functionality for detecting tree maintainers Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 5/9] tools: add functionality for setting pw delegates Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 6/9] add git-pw to requirements file Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 7/9] tools: filter new patchwork IDs by date Ali Alnubani
2021-09-06 15:58 ` Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 8/9] tools: add support for fetching new series IDs Ali Alnubani
2021-09-06 15:45 ` [dpdk-ci] [PATCH 9/9] tools: filter new patchwork IDs by project name Ali Alnubani
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 00/10] Automatic patchwork delegation alialnu
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 01/10] tools: rename guess_git_tree script alialnu
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 02/10] tools: match by tree url instead of tree name alialnu
2021-09-30 8:00 ` Thomas Monjalon
2021-10-18 7:48 ` Ali Alnubani
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 03/10] tools: update script usage alialnu
2021-09-30 8:09 ` Thomas Monjalon
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 04/10] tools: add functionality for detecting tree maintainers alialnu
2021-09-30 8:29 ` Thomas Monjalon [this message]
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 05/10] tools: add functionality for setting pw delegates alialnu
2021-09-30 9:15 ` Thomas Monjalon
2021-10-18 7:48 ` Ali Alnubani
2021-10-26 14:08 ` Thomas Monjalon
2021-11-04 16:48 ` Ali Alnubani
2021-11-04 18:16 ` Thomas Monjalon
2021-11-08 7:45 ` Ali Alnubani
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 06/10] add git-pw to requirements file alialnu
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 07/10] tools: filter new patchwork IDs by date alialnu
2021-10-11 20:08 ` Ali Alnubani
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 08/10] tools: add support for fetching new series IDs alialnu
2021-09-30 10:25 ` Thomas Monjalon
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 09/10] tools: filter new patchwork IDs by project name alialnu
2021-09-30 10:28 ` Thomas Monjalon
2021-09-21 14:35 ` [dpdk-ci] [PATCH v2 10/10] tools: skip the IDs we already fetched alialnu
2021-09-30 10:32 ` Thomas Monjalon
2021-10-11 19:30 ` Ali Alnubani
2021-10-12 6:44 ` Thomas Monjalon
2021-10-18 8:04 ` Ali Alnubani
2021-10-26 14:07 ` Thomas Monjalon
2021-11-04 16:53 ` Ali Alnubani
2021-11-04 18:08 ` Thomas Monjalon
2021-11-08 7:44 ` Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 00/10] Automatic patchwork delegation Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 01/10] tools: rename guess_git_tree script Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 02/10] tools: match by tree URL instead of tree name Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 03/10] tools: update script usage Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 04/10] tools: add functionality for detecting tree maintainers Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 05/10] tools: add functionality for setting pw delegates Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 06/10] add git-pw to requirements file Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 07/10] tools: filter new Patchwork IDs by date Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 08/10] tools: support fetching series Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 09/10] tools: filter new patchwork IDs by project name Ali Alnubani
2021-11-08 6:28 ` [dpdk-ci] [PATCH v4 10/10] tools: skip the IDs we already fetched Ali Alnubani
2022-01-05 1:05 ` [PATCH v4 00/10] Automatic patchwork delegation Thomas Monjalon
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=6750166.sAAn6ldZEP@thomas \
--to=thomas@monjalon.net \
--cc=alialnu@nvidia.com \
--cc=ci@dpdk.org \
--cc=david.marchand@redhat.com \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=juraj.linkes@pantheon.tech \
/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;
as well as URLs for NNTP newsgroup(s).