This connection type connects a GitLab project (e.g. https://gitlab.matrix.org/matrix-org/olm) to a room.
To set up a connection to a GitLab project in a new room:
(NB you must have permission to bridge GitLab repositories before you can use this command, see auth.)
- Create a new, unencrypted room. It can be public or private.
- Invite the bridge bot (e.g.
- Give the bridge bot moderator permissions or higher (power level 50) (or otherwise configure the room so the bot can edit room state).
- Send the command
!hookshot gitlab project https://mydomain/my/project.
- If you have permission to bridge this repo, the bridge will respond with a confirmation message. (Users with
Developerpermissions or greater can bridge projects.)
- If you have configured the bridge with a
gitlab.webhookin your config, you authenticated with Hookshot on that instance in your admin room, and you have
Maintainerpermissions or greater on the project, the bot will automatically provision the webhook for you.
- Otherwise, you'll need to manually configure the project with a webhook that points to your public address for the webhooks listener, sets the "Secret token" to the one you put in your Hookshot configuration (
gitlab.webhook.secret), and enables all Triggers that need to be bridged (as Hookshot can only bridge events for enabled Triggers). This can be configured on the GitLab webpage for the project under Settings > Webhook Settings. If you do not have access to this page, you must ask someone who does (i.e. someone with at least
Maintainerpermissions on the project) to add the webhook for you.
This connection supports a few options which can be defined in the room state:
|commandPrefix||Choose the prefix to use when sending commands to the bot||A string, ideally starts with "!"|
|enableHooks 1||Enable notifications for some event types||Array of: Supported event types||If not defined, defaults are mentioned below|
|excludingLabels||Never notify on issues matching these label names||Array of: String matching a label name||empty|
|ignoreHooks 1||deprecated Choose to exclude notifications for some event types||Array of: Supported event types||empty|
|includeCommentBody||Include the body of a comment when notifying on merge requests||Boolean||false|
|includingLabels||Only notify on issues matching these label names||Array of: String matching a label name||empty|
|pushTagsRegex||Only mention pushed tags which match this regex||Regex string||empty|
ignoreHooks is no longer accepted for new state events. Use
enableHooks to explicitly state all events you want to see.
This connection supports sending messages when the following actions happen on the repository.
Note: Some of these event types are enabled by default (marked with a
ignoreHooks is defined,
the events marked as default below will be enabled. Otherwise, this is ignored.
- merge_request *
- merge_request.close *
- merge_request.merge *
- merge_request.open *
- merge_request.review.comments *
- merge_request.review *
- push *
- release *
- release.created *
- tag_push *
- wiki *