[Patchew-devel] [PATCH] git: allow not passing the URL to applier-report

Fam Zheng fam at euphon.net
Mon Jan 14 03:04:36 UTC 2019



> On Jan 11, 2019, at 18:02, Paolo Bonzini <pbonzini at redhat.com> wrote:
> 
> The applier-report handler tried to use the URL template from the project, but there
> was a bug in the logic to do so.  Fix it.
> 
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
> mods/git.py | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/mods/git.py b/mods/git.py
> index a163062..4f3236b 100644
> --- a/mods/git.py
> +++ b/mods/git.py
> @@ -273,9 +273,10 @@ class ApplierReportView(APILoginRequiredView):
>             data['tag'] = 'refs/tags/' + tag
>             if url:
>                 data['url'] = url
> -            elif url_template and tag:
> +            elif tag:
>                 url_template = p.get_property("git.url_template")
> -                data['url'] = url_template.replace("%t", tag)
> +                if url_template:
> +                    data['url'] = url_template.replace("%t", tag)
>             if base:
>                 data['base'] = base
>             r.status = Result.SUCCESS

Reviewed-by: Fam Zheng <fam at euphon.net>







More information about the Patchew-devel mailing list