From f51dd26d25eea55a0c1b0ff016652d8324263434 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 5 Sep 2023 11:03:50 -0700 Subject: [PATCH] Update autojob to handle branch regexes Now that a job branch list can be a list of dictionaries, the autojob directive can hit this error: variant = ', '.join(branches) TypeError: sequence item 0: expected str instance, dict found Handle this by serializing the dictionaries with (str) so that we get something printable. It's not going to be pretty, but the old regexes weren't either. Change-Id: I9c0b242a8993760a7b7b27bbf231550c03cde183 --- zuul_sphinx/zuul.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul_sphinx/zuul.py b/zuul_sphinx/zuul.py index bb669be..be0e97a 100644 --- a/zuul_sphinx/zuul.py +++ b/zuul_sphinx/zuul.py @@ -156,7 +156,7 @@ class ZuulDirective(Directive): branches = job['branches'] if not isinstance(branches, list): branches = [branches] - variant = ', '.join(branches) + variant = ', '.join([str(x) for x in branches]) lines.append(' :variant: %s' % variant) lines.append('') for l in job.get('description', '').split('\n'):