GitLab
To set up the connection to your GitLab account use the command /channel general edit with the field API (Premium).
API Provider
First choose the API Provider from the dropdown and select GitLab.
When you edit the API Provider all other settings will be reset!
API Token
You can follow the official GitLab documentation on how to create an API token. I would suggest to create a project access token. This way you can give the bot a name under which the API requests are tracked. It's also more secure than creating a personal access token. With a personal access token, the bot would create issues under your name and would also have access to every project you have access to!.
To create a project access token, you basically need to:
- Select your project
- Settings
- Access Tokens
- Add new token
- Name: This name will be displayed when the bot performs actions via the API
- Role: The bot needs to have at least "Reporter". "Guests" do not have the permission to create issues/add labels.
- Scope: Api
The maximum age of API tokens are 1 year. Submitty automatically rotates tokens every week and applies an age of 1 Month to them. This way tokens will not expire.
If you want to remove access to the project, you can simply invalidate the token.
Project ID
The project id can be found by:
- Selecting your project
- Settings
- General
- Copy the
Project ID
Once you have completed all steps above, it is recommended to test the API connection before proceeding.