The number/order prefix from a patch Subject line
is inapropriately included when naming a Series where
a cover letter is not provided and an additional
prefix is present at the Subject.

This change improves the substitution regex to omit
the number/order and any other prefix that may be
present.

[YOCTO #11305]

Signed-off-by: Jose Lamego <jose.a.lam...@linux.intel.com>
---

Notes:
    Changes in v2: Ommit all of the prefixes that may be present in first patch 
to name the series

 patchwork/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patchwork/models.py b/patchwork/models.py
index ddc3254..a34e0fc 100644
--- a/patchwork/models.py
+++ b/patchwork/models.py
@@ -1046,7 +1046,7 @@ def _on_revision_complete(sender, revision, **kwargs):
     # so we can update the name for series without a cover letter
     if series.name == SERIES_DEFAULT_NAME:
         name = series.latest_revision().ordered_patches()[0].name
-        n = re.compile(r'(\[\d+\/\d+\]\s?)')
+        n = re.compile(r'(\[.*\]\s?)')
         name = n.sub('', name)
         c = len(series.latest_revision().ordered_patches())
         # For one-patch series (1/1) without cover letter
-- 
2.7.4

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to