Re: [PATCH v3 1/1] scripts: Add add-maintainer.py

From: Guru Das Srinagesh
Date: Wed Sep 27 2023 - 18:48:07 EST


On Sep 26 2023 17:32, Pavan Kondeti wrote:
> On Sat, Aug 26, 2023 at 01:07:42AM -0700, Guru Das Srinagesh wrote:
> > +def gather_maintainers_of_file(patch_file):
> > + all_entities_of_patch = dict()
> > +
> > + # Run get_maintainer.pl on patch file
> > + logging.info("GET: Patch: {}".format(os.path.basename(patch_file)))
> > + cmd = ['scripts/get_maintainer.pl']
> > + cmd.extend([patch_file])
> > +
> > + try:
> > + p = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
> > + except:
> > + sys.exit(1)
> > +
> > + logging.debug("\n{}".format(p.stdout.decode()))
> > +
> > + entries = p.stdout.decode().splitlines()
> > +
> > + maintainers = []
> > + lists = []
> > + others = []
> > +
> > + for entry in entries:
> > + entity = entry.split('(')[0].strip()
> > + if any(role in entry for role in ["maintainer", "reviewer"]):
> > + maintainers.append(entity)
> > + elif "list" in entry:
> > + lists.append(entity)
> > + else:
> > + others.append(entity)
> > +
> > + all_entities_of_patch["maintainers"] = set(maintainers)
> > + all_entities_of_patch["lists"] = set(lists)
> > + all_entities_of_patch["others"] = set(others)
> > +
> > + return all_entities_of_patch
> > +
>
> FYI, there are couple of issues found while playing around.

Thanks for testing this out :) I am no longer working on this due to pushback
from the maintainers in favour of b4.

>
> - Some entries in MAINTAINERS could be "supporter"

This was intentional - I didn't want to include "supporter"s.

> - When names contain ("company"), the script fails to extract name.

Interesting... I had not tested this out.

In any case, I am not devoting resources to work on this unless I see some
interest from maintainers, which, as it stands currently, is nil.

Thanks for the support, Pavan.

Guru Das.