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_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.
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
NamedTuple
providing issue information.- id#
The issue id as string.
If you are writing your own custom callback for Events, set this attribute to the
issue_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.