[dpdk-ci] [PATCH v2 05/10] tools: add functionality for setting pw delegates
Ali Alnubani
alialnu at oss.nvidia.com
Mon Oct 18 09:48:05 CEST 2021
> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Thursday, September 30, 2021 12:15 PM
> To: Ali Alnubani <alialnu at nvidia.com>
> Cc: ci at dpdk.org; jerinj at marvell.com; ferruh.yigit at intel.com;
> david.marchand at redhat.com; juraj.linkes at pantheon.tech
> Subject: Re: [PATCH v2 05/10] tools: add functionality for setting pw
> delegates
>
> 21/09/2021 16:35, alialnu at nvidia.com:
> > From: Ali Alnubani <alialnu at nvidia.com>
> >
> > A new command was added to set patch delegates in Patchwork
> > based on the emails found in DPDK's MAINTAINERS file.
> >
> > Example usage:
> > $ export MAINTAINERS_FILE_PATH=/path/to/dpdk/MAINTAINERS
> > $ ./pw_maintainers_cli.py --type series set_pw_delegate SERIES_ID
> >
> > Signed-off-by: Ali Alnubani <alialnu at nvidia.com>
> > ---
> > + def set_delegate(self, patch_list, delegate):
> > + """Set the delegate for a patch.
> > + Only tries to set a delegate for patches that don't have
> > + one set already.
>
> I'm not sure we should skip patches which are already delegated.
> If we use the command to explicitly delegate the patch,
> we should do it, right?
>
> The skip logic may be implemented at a higher level in the CI.
I added an arg (--force_set_delegate) to force overriding delegates in v3.
>
> > + Reference:
> > + https://github.com/getpatchwork/git-
> pw/blob/76b79097dc0a57c89b45dd53d9cacb7ff7b31bb2/git_pw/patch.py#L1
> 67
> > + """
> > + users = api.index('users', [('q', delegate)])
> > + if len(users) != 1:
> > + # Zero or multiple users found
> > + print('Cannot choose a Patchwork user to delegate to from '
> > + 'user list ({}). Skipping..'.format(users))
> > + return
> > + for patch in patch_list:
> > + if patch['delegate']:
> > + print('Patch {} is already delegated to {}. '
> > + 'Skipping..'.format(
> > + patch['id'], patch['delegate']['email']))
> > + continue
> > + print("Delegating patch {} to {}.".format(
> > + patch['id'], users[0]['email']))
> > + _ = api.update(
> > + 'patches', patch['id'], [('delegate', users[0]['id'])])
>
>
More information about the ci
mailing list