Table of Contents
GHIssues Plugin
Compatible with DokuWiki
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" no
- 2017-02-19 "Frusterick Manners" unknown
Similar to issuelinks
Description
Allows the insertion of a table showing issues from the bug tracker on a GitHub repository. Filtering by state (open/closed/all) and label are supported. The table shows issue number, title, any labels (with their assigned colors) as well as creation date/time and creator.
Each issue title is also a link to the appropriate issue page on GitHub, and there is a link to the table's equivalent issues search in the footer of the table.
GitHub API responses are cached locally and the table is only updated when upstream changes occur.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Examples/Usage
Below are code snippets and static screenshots of the plugin's output with data from the DokuWiki Repository on GitHub1).
Open Issues for a Label
Open Issues with Both Labels
All (Open & Closed) Issues for a Label
{{ghissues dokuwiki/Dokuwiki state:all label:feature}}
Closed Issues for a Label
Syntax
Basic syntax:
{{ghissues <repository> [state:<all|open|closed>] [label:<label1,label2,label3>]}}
Specifically:
{{ghissues
(required) marks the start<repository>
(required) gives the repository whose issues you'd like to list. Given inuser/repo
format, e.g.ZJ/ghissues
state:<>
(optional) Case sensitive.state:
indicates you'd like to filter by state, and<>
can be followed by one of (all lowercase):all
open
closed
label:<>
(optional) comma-separated list of labels to filter by. Labels are filtered using AND, i.e. on issues with bothlabel1
ANDlabel2
would be shown if you enteredlabel:label1,label2
. There should be no space between the last label and the closing braces}}
(required) closes the pattern.
Configuration and Settings
Three user settings are available.
- “GitHub Cache Expiry Interval (seconds)“ sets how long DokuWiki waits before making another GitHub API request. The timer is applied on a per-request URL basis.
- “GitHub Account Username” sets a user name that is sent along with GitHub API requests.
- “GitHub Personal OAuth Token” To increase GitHub's rate limit from 60/hour to 5000/hour, you can provide a personal OAuth token here. More info below.
OAuth Token
GitHub allow authentication via personal OAuth tokens which can be generated at https://github.com/settings/applications. This is nice because it avoids having to provide a username/password combination. You can also control which parts of your account a token has access to.
Do I need to use Oauth Tokens?
Short answer: probably not. There are two reasons to use one:
- You want to look at issues from private repositories. To do this, you'll need an OAuth token for an account that has access to those repositories
- You need >60 requests per hour.
This plugin does its best to minimize the number of requests it makes. It implements cacheing on DokuWiki's side together with conditional HTTP requests. The quick-and-dirty rule is that you'll generate 1 request per unique table per change to an issue on GitHub's side.
Development
Change Log
See https://github.com/ZJ/ghissues/commits/master
- Change formatting of "No Issues Found" line (2014-10-18 16:30)
- Added dropped 's' to Lexer pattern (2014-10-08 06:38)
- Update doc URL, change OAuth input to password (2014-10-08 06:13)
- Move everything to root level (2014-10-07 22:46)
- Optionally Authenticate with Personal OAuth token (2014-10-07 03:20)
- Implemented 'PARSER_CACHE_USE' event handling (2014-10-07 02:30)
- Allow filtering by state or label (2014-10-06 13:56)
- Add header & footer to box (2014-10-03 15:40)
ToDo/Wish List
- Empty for now