GitLab Macros Application

Last modified by Admin on 2026/08/26 14:12

cogProvide reporting macros for GitLab
TypeXAR
CategoryApplication
Developed by

Ludovic Dubost, Denis Gervalle, Clément Aubin

Active Installs41
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Success

Installable with the Extension Manager

Description

Provide reporting macros for GitLab allowing to display GitLab issues from a project.

Administration

In the Administration section, it is possible to configure GitLab instances including authentication parameters using GitLab tokens. If the instance data is public the token can be left empty. Each instance will be identified by an "id" which can then be used in the macros parameters.

gitlabmacroadmin.png

Usage

The following parameters are available

ParameterDescriptionMandatorySinceDefault value
idThis should correspond to the id set in the administration panelYes  
projectIdProject ID to search for issues in. The project Id is a number displayed on the GitLab project home pageYes   
groupIdGroup ID(s) to search for issues in. Accepts a comma-separated list of group identifiers, where each identifier can be either a numeric ID or a group name.Yes2.5  
style

Indicate the display type of the macro.

Multiple display modes are possible:

  • default: displays only a link to the issue(s) and striking the number if the issue is clossed
  • list: displays the issue(s) as a list with the title of the issue
  • table: displays the issue(s) as a table with the title of the issue
  • report: displays the issue(s) as a report with the title of the issue and also the commits performed and files associated to the commits
  • count: displays a single count of issues in filter
  • stats: displays a count of issues grouped by a specific field (set in statsGroup parameter assignee.name, project)
  • openclosegraph: display a graph of the evolution of number of open issues in the last N days (set by openCloseGraphDays parameter)

Here are some examples:

gitlabmacro1.png

gitlabmacro2.png

gitlabmacro3.png

gitlabmacro4.png

gitlabmacro5.png

Yes  
pageDefine which page to display from the GitLab API results. This parameter is only important if you are applying an issue query. If the parameter is not provided or set to 0, the macro will attempt to get every issue it can, going through every page of the API.No2.20
pageSizeDefine the size of a page to use for the GitLab API.No2.2100
fieldsComma-separated list of fields to display in the table view. Supported fields include standard issue fields (id, title, state, created_at, closed_at, labels, assignee, time_stats.time_estimate) and group fields (groupName, groupId)
uriParameter used for the count style to add a link to the GitLab filterNo2.4 
uriParameter used for the count style to add a link to the GitLab filterNo2.4 
uriParameter used for the count style to add a link to the GitLab filterNo2.4 
statsGroupParameter used for the stats style, defining the field to group counts by. Examples: state or assignee.name or projectNo2.4 
statsGroupSortParameter used for the stats style to sort table by value or by key. Possible values are: key or value.No2.4 
statsGroupShowOpenClosedParameter used for the stats style, allowing to show number of open and closed issues instead of the totalNo2.4 
statsGroupShowOpenClosedRecentParameter used for the stats style, allowing to add a recently closed columns since N days ago, N being the value of statsGroupShowOpenClosedRecentNo2.4 
openCloseGraphDaysParameter used for the openclosegraph style, allowing to set the number of days for this graphNo2.47 days
graphIdParameter used for the openclosegraph style, needed if multiple graphs are included on the same pageNo2.4

Query (content of the macro)

A query (or filter) can be used to find the relevant issues. The filters are on each line.

param=value

Example:

not[labels]=label1,label2
labels=P1
milestone=m7
state=opened

More info on the GitLab API page: https://docs.gitlab.com/ee/api/issues.html#list-issues

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Versions

Get Connected