diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/releng-macros.yaml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index 1f3da79ba..51a6ba60b 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -159,13 +159,20 @@ _get_title_script=" import os - from docutils import core + from docutils import core, nodes with open('index.rst', 'r') as file: data = file.read() - doctree = core.publish_doctree(data, - settings_overrides={'report_level': 5, - 'halt_level': 5}) - print doctree[0].astext()" + doctree = core.publish_doctree(data, + settings_overrides={'report_level': 5, + 'halt_level': 5}) + if isinstance(doctree[0], nodes.title): + title = doctree[0] + else: + for c in doctree.children: + if isinstance(c, nodes.section): + title = c[0] + break + print title.astext()" _git_sha1="$(git rev-parse HEAD)" git clone ssh://gerrit.opnfv.org:29418/releng |