Bug 9402

Summary: patchtest: filter incoming series by users
Product: [Yocto Project Subprojects] Patchwork/Patchtest Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: PatchtestAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED FIXED QA Contact: David Rodriguez <david.israelx.rodriguez.castellanos>
Severity: enhancement    
Priority: Medium+ CC: jose.perez.carranza
Version: 2.1   
Target Milestone: 2.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Leonardo Sandoval Gonzalez 2016-04-06 15:13:52 UTC
Currently patchtest takes any new series event, no matter what the submitter is, and post results to patchwork. This is the general usage but for the moment, it would be useful to just take into consideration selected people (patchtest or patchtest-oe developers), so in the testing phase, the patchwork/test do not spam others with mails that may not be relevant at this moment.
Comment 1 Leonardo Sandoval Gonzalez 2016-04-06 20:35:06 UTC
This is something to be implemented before production.
Comment 2 Leonardo Sandoval Gonzalez 2016-04-27 20:53:20 UTC
The feature is implemented using a command line argument, which is a string indicating a python regular expression. This regex is scanned into the item's submitter, if match then the POST request is done. By default, this regex is empty, so no post is done.

Command line example:

# No posting
git pw poll-events | patchtest 

# post all series, not matter the submitter
git pw poll-events | patchtest --include-post-users '.*'

# post series for those submitters with email's host/domain 'linux.intel.com'
git pw poll-events | patchtest --include-post-users '.*@linux.intel.com'
Comment 3 Leonardo Sandoval Gonzalez 2016-04-27 21:03:51 UTC
(In reply to comment #2)
> The feature is implemented using a command line argument, which is a string
> indicating a python regular expression. This regex is scanned into the
> item's submitter, if match then the POST request is done. By default, this
> regex is empty, so no post is done.
> 
> Command line example:
> 
> # No posting
> git pw poll-events | patchtest 
> 
> # post all series, not matter the submitter
> git pw poll-events | patchtest --include-post-users '.*'
> 
> # post series for those submitters with email's host/domain 'linux.intel.com'
> git pw poll-events | patchtest --include-post-users '.*@linux.intel.com'

Small change done, now the parameter a simpler name: '--post-submitters' or simple '-p'