hookshot/docs/setup/gitlab.md
Will Hunt 8f2cf779ac
Further docs clarifications (#150)
* Clarify secret token.

* Fix list in Jira.
Fixes #146

* Try to clarify the GitHub docs a bit. Fixes #148

* Add documentation on Docker config validation.
Fixes #152

* Update docs/setup/jira.md

Co-authored-by: Kim Brose <kim.brose@rwth-aachen.de>

Co-authored-by: Kim Brose <kim.brose@rwth-aachen.de>
2022-01-11 18:44:16 +00:00

1.4 KiB

GitLab

Configuration

GitLab configuration is fairly straight-forward:

  # (Optional) Configure this to enable GitLab support
  #
  instances:
    gitlab:
      url: https://gitlab.com
  webhook:
    secret: secrettoken

You need to list all the instances you plan to connect to in the config.yml. This is used so that users can give a short name like gitlab or matrix.org when they want to specify an instance.

You should generate a webhook secret (e.g. pwgen -n 64 -s 1) and then use this as your "Secret token" when adding webhooks.

Adding a repository

Adding a repository is a case of navigating to the settings page, and then adding a new webhook. You will want to give the URL of the public address for the hookshot webhooks port on the / path.

You should use the value of webhook.secret from your config as your "Secret token".

You should add the events you wish to trigger on. Hookshot currently supports:

  • Push events
  • Tag events
  • Issues events
  • Merge request events
  • Releases events

You will need to do this each time you want to a repository to hookshot.

To then bridge a room to GitLab, you will need to add a uk.half-shot.matrix-hookshot.gitlab.repository state event to a room containing a content of:

{
    "instance": "gitlab", // your instance name
    "path": "yourusername/repo" // the full path to the repo
}

Once this is done, you are bridged 🥳.