From: Ali Alnubani <alialnu@nvidia.com> To: <ci@dpdk.org> Cc: David Marchand <david.marchand@redhat.com> Subject: [PATCH 1/2] pw_maintainers_cli: try delegating to multiple maintainers Date: Fri, 15 Apr 2022 13:16:10 +0300 Message-ID: <20220415101611.364-1-alialnu@nvidia.com> (raw) Instead of skipping patch delegation when there are no Patchwork users associated with the email of the first maintainer, try to delegate to other tree maintainers. Suggested-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ali Alnubani <alialnu@nvidia.com> --- tools/pw_maintainers_cli.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/pw_maintainers_cli.py b/tools/pw_maintainers_cli.py index fd69081..ad51e3d 100755 --- a/tools/pw_maintainers_cli.py +++ b/tools/pw_maintainers_cli.py @@ -112,6 +112,7 @@ class GitPW(object): patch['id'], users[0]['email'])) _ = api.update( 'patches', patch['id'], [('delegate', users[0]['id'])]) + return users[0].get('email') class Diff(object): @@ -366,16 +367,18 @@ if __name__ == '__main__': print(*maintainer_list, sep='\n') elif command == 'set-pw-delegate': if len(maintainer_list) > 0: - # Get the email of the first maintainer in the list. - try: - delegate = re.match( - r".*\<(?P<email>.*)\>", - maintainer_list[0]).group('email') - except AttributeError: - print("Unexpected format: '{}'".format(maintainer_list[0])) - sys.exit(1) - _git_pw.set_delegate( - patch_list, delegate, - skip_delegated=skip_delegated) + for maintainer in maintainer_list: + # Get the maintainer's email + try: + maintainer_email = re.match( + r".*\<(?P<email>.*)\>", + maintainer).group('email') + except AttributeError: + print("Unexpected format: '{}'".format(maintainer)) + delegate = _git_pw.set_delegate( + patch_list, maintainer_email, + skip_delegated=skip_delegated) + if delegate != None: + break else: print('No maintainers found. Not setting a delegate.') -- 2.25.1
next reply other threads:[~2022-04-15 10:16 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-15 10:16 Ali Alnubani [this message] 2022-04-15 10:16 ` [PATCH 2/2] pw_maintainers_cli: write errors to stderr Ali Alnubani 2022-04-25 17:18 ` Aaron Conole 2022-04-26 9:28 ` Ali Alnubani 2022-04-25 17:18 ` [PATCH 1/2] pw_maintainers_cli: try delegating to multiple maintainers Aaron Conole 2022-05-02 16:47 ` 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=20220415101611.364-1-alialnu@nvidia.com \ --to=alialnu@nvidia.com \ --cc=ci@dpdk.org \ --cc=david.marchand@redhat.com \ /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
DPDK CI discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/ci/0 ci/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ci ci/ http://inbox.dpdk.org/ci \ ci@dpdk.org public-inbox-index ci Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.ci AGPL code for this site: git clone https://public-inbox.org/public-inbox.git