From d8f4e88862896466ca5b70c97d572b4a4c071ad0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 1 Dec 2016 12:02:26 +0000 Subject: [PATCH] Point roles docs bugs to openstack-ansible LP Currently when clicking on the small bug in the roles' docs, we land on openstack-manuals launchpad. This should solve it. Change-Id: If9ed66dc7aa780994c901eb246633152bd5b86d4 --- doc/source/conf.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 18f1040c..eb86ab64 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -83,6 +83,22 @@ release = version_info.version_string_with_vcs() # The short X.Y version. version = version_info.canonical_version_string() +# A few variables have to be set for the log-a-bug feature. +# giturl: The location of conf.py on Git. Must be set manually. +# gitsha: The SHA checksum of the bug description. +# Automatically extracted from git log. +# bug_tag: Tag for categorizing the bug. Must be set manually. +# These variables are passed to the logabug code via html_context. +giturl = ("http://git.openstack.org/cgit/openstack/{0}" + "/tree/doc/source").format(target_name) +git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" +gitsha = os.popen(git_cmd).read().strip('\n') +bug_project = project.lower() +bug_title = "Documentation bug" +html_context = {"gitsha": gitsha, "giturl": giturl, + "bug_tag": "docs", "bug_title": bug_title, + "bug_project": bug_project} + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #