diff mbox

[kteam-tools] verify-release-ready: fix for new style of release tb

Message ID 20170427165354.11490-1-kleber.souza@canonical.com
State New
Headers show

Commit Message

Kleber Sacilotto de Souza April 27, 2017, 4:53 p.m. UTC
The check for the 'release tracking bug' was looking only for the old
style tracking bug on the changelog:

  * Release Tracking Bug
    - LP: #<lp number>

Change it catch also the new style:

  * linux: <version> -proposed tracker (LP: #<lp number>)

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
---
 maintscripts/verify-release-ready | 2 ++
 1 file changed, 2 insertions(+)

Comments

Po-Hsu Lin April 28, 2017, 3:39 a.m. UTC | #1
On Fri, Apr 28, 2017 at 12:53 AM, Kleber Sacilotto de Souza
<kleber.souza@canonical.com> wrote:
> The check for the 'release tracking bug' was looking only for the old
> style tracking bug on the changelog:
>
>   * Release Tracking Bug
>     - LP: #<lp number>
>
> Change it catch also the new style:
>
>   * linux: <version> -proposed tracker (LP: #<lp number>)
>
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
> ---
>  maintscripts/verify-release-ready | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
> index 7413cab5..1fd34a9d 100755
> --- a/maintscripts/verify-release-ready
> +++ b/maintscripts/verify-release-ready
> @@ -215,6 +215,8 @@ class VerifyReleaseReady():
>          #
>          found_tracker = False
>          for line in changelog[1]['content']:
> +            if '-proposed tracker' in line:
> +                found_tracker = True

I think it's better to group the old if statement for 'Tracking Bug':
            if 'Tracking Bug' in line:
                found_tracker = True
alongside this new one, since they serve the same purpose.

>              if found_tracker:
>                  if '#' in line:
>                      (junk, tracker_id) = line.split('#')
> --
> 2.11.0
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Kleber Sacilotto de Souza April 28, 2017, 7:03 a.m. UTC | #2
On 04/28/2017 05:39 AM, Po-Hsu Lin (Sam) wrote:
> On Fri, Apr 28, 2017 at 12:53 AM, Kleber Sacilotto de Souza
> <kleber.souza@canonical.com> wrote:
>> The check for the 'release tracking bug' was looking only for the old
>> style tracking bug on the changelog:
>>
>>   * Release Tracking Bug
>>     - LP: #<lp number>
>>
>> Change it catch also the new style:
>>
>>   * linux: <version> -proposed tracker (LP: #<lp number>)
>>
>> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
>> ---
>>  maintscripts/verify-release-ready | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
>> index 7413cab5..1fd34a9d 100755
>> --- a/maintscripts/verify-release-ready
>> +++ b/maintscripts/verify-release-ready
>> @@ -215,6 +215,8 @@ class VerifyReleaseReady():
>>          #
>>          found_tracker = False
>>          for line in changelog[1]['content']:
>> +            if '-proposed tracker' in line:
>> +                found_tracker = True
> 
> I think it's better to group the old if statement for 'Tracking Bug':
>             if 'Tracking Bug' in line:
>                 found_tracker = True
> alongside this new one, since they serve the same purpose.

It's not just grouping the if's, since it would break the logic. But I
agree, the code can be more elegant (this was a quick fix after a long
day). I will work on a v2.


Thanks!

> 
>>              if found_tracker:
>>                  if '#' in line:
>>                      (junk, tracker_id) = line.split('#')
>> --
>> 2.11.0
>>
>>
>> --
>> kernel-team mailing list
>> kernel-team@lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox

Patch

diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
index 7413cab5..1fd34a9d 100755
--- a/maintscripts/verify-release-ready
+++ b/maintscripts/verify-release-ready
@@ -215,6 +215,8 @@  class VerifyReleaseReady():
         #
         found_tracker = False
         for line in changelog[1]['content']:
+            if '-proposed tracker' in line:
+                found_tracker = True
             if found_tracker:
                 if '#' in line:
                     (junk, tracker_id) = line.split('#')