API#
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 Events:
Events#
- issuetracker-lookup-issue(app, tracker_config, issue_id)#
Emitted if the issue with the given
issue_idshould be looked up in the issue tracker. Issue tracker configured is provided bytracker_config.appis the Sphinx application object.tracker_configis the issuetracker configuration asTrackerConfigobject.issue_idis the issue id as string.A callback should return an
Issueobject containing the looked up issue, orNoneif it could not find the issue. In the latter case other callbacks connected to this event are be invoked by Sphinx.
Refer to the builtin trackers for examples.
Structures#
- class sphinx_autoissues.TrackerConfig(project, url=None)#
-
- 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.
- class sphinx_autoissues.Issue(id, title, url, closed)#
Create new instance of Issue(id, title, url, closed)
A
NamedTupleproviding issue information.- id#
The issue id as string.
If you are writing your own custom callback for Events, set this attribute to the
issue_idthat 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,Falseotherwise.