Customization¶
To use an issue tracker not supported by this extension, set
issuetracker
to None
or leave it unset, and connect your own
callback to the event issuetracker-lookup-issue
:
- issuetracker-lookup-issue(app, tracker_config, issue_id)¶
Emitted if the issue with the given
issue_id
should be looked up in the issue tracker. Issue tracker configured is provided bytracker_config
.app
is the Sphinx application object.tracker_config
is the issuetracker configuration asTrackerConfig
object.issue_id
is the issue id as string.A callback should return an
Issue
object containing the looked up issue, orNone
if it could not find the issue. In the latter case other callbacks connected to this event are be invoked by Sphinx.Changed in version 0.8: Replaced
project
argument withtracker_config
, changed return value from dictionary toIssue
Changed in version 0.9: Renamed from
issuetracker-resolve-issue
toissuetracker-lookup-issue
Refer to the builtin trackers for examples.
Supporting classes¶
- class sphinxcontrib.issuetracker.TrackerConfig(project, url=None)¶
Issue tracker configuration.
This class provides configuration for trackers, and is passed as
tracker_config
arguments to callbacks ofissuetracker-lookup-issue
.- project¶
The project name as string.
- url¶
The url of the issue tracker as string without any trailing slash, or
None
, if there is no url configured for this tracker. Seeissuetracker_url
.
New in version 0.8.
- class sphinxcontrib.issuetracker.Issue¶
A
namedtuple()
providing issue information.- id¶
The issue id as string.
If you are writing your own custom callback for
issuetracker-lookup-issue
, set this attribute to theissue_id
that was given as argument.
- title¶
The human readable title of this issue as string.
- url¶
A string containing an URL for this issue.
This URL is used as hyperlink target in the generated documentation. Thus it should point to a webpage or something similar that provides human-readable information about an issue.
- closed¶
True
, if the issue is closed,False
otherwise.
New in version 0.8.