GitLab Integration
Used for: Triggers
Promptless integrates with GitLab using group access token authentication, monitoring merge requests in your repositories for documentation updates.
Installation
Section titled “Installation”To set up the GitLab integration:
- Go to the Integrations page in the Promptless dashboard.
- Click Connect GitLab.
- Enter a GitLab group access token with the
apiscope. - Click Connect.
Required Scope
Your GitLab group access token must have the api scope. Tokens without this scope don’t work with Promptless.
Creating a GitLab Group Access Token
To create a group access token with the required permissions:
- Sign in to your GitLab account.
- Navigate to your group’s Settings > Access Tokens.
- Click Add new token.
- Give it a descriptive name like “Promptless Integration”.
- Set an expiration date (group access tokens have a maximum 1-year lifespan).
- Select the
apiscope. - Choose an appropriate role (Developer or higher recommended).
- Click Create group access token.
- Copy the token immediately—you won’t be able to see it again.
For more details, see GitLab’s group access token documentation.
Project Setup
Section titled “Project Setup”After connecting your GitLab account, you can configure how Promptless interacts with your projects:
Repository Access
Section titled “Repository Access”When setting up a project with GitLab as a trigger source:
- Select the GitLab projects you want Promptless to monitor for changes.
- Choose whether Promptless should have read-only access or write access to your documentation repositories.
- Optionally, configure directory-specific triggers to focus on particular parts of your codebase.
Directory-Specific Triggers
Section titled “Directory-Specific Triggers”You can configure Promptless to only trigger documentation updates when changes are made to specific directories in your GitLab projects. This is useful for:
- Focusing on code that directly impacts user-facing features
- Monitoring API changes that require documentation updates
- Ignoring internal tooling or test changes that don’t affect documentation
To set up directory-specific triggers:
- In your project configuration, select the GitLab project.
- Under Advanced Options, enable Directory-Specific Triggers.
- Enter the directories you want to monitor, separated by commas (e.g.,
src/api, docs/reference).
Authentication Model
Section titled “Authentication Model”The GitLab integration uses group access token authentication:
- Group Access Token: A secure token with the
apiscope for full API access - Instance Access: Works with both GitLab.com and self-hosted GitLab instances
This authentication model ensures that Promptless only has access to the projects and actions you explicitly authorize through the token’s permissions.
Webhook Management
Section titled “Webhook Management”Promptless automatically sets up webhooks in your GitLab projects to monitor for merge request events. These webhooks:
- Trigger Promptless when merge requests are created or updated
- Send only the necessary information about changes to Promptless
- Can be customized to focus on specific events
Once configured, the GitLab integration works similarly to other code hosting integrations:
- When a merge request is opened or updated in your monitored projects, Promptless is automatically triggered.
- Promptless analyzes the changes to determine if documentation updates are needed.
- If updates are needed, Promptless generates the appropriate documentation changes.
- Promptless adds a comment to your GitLab merge request with a link to review the documentation changes.
- You can review and approve the suggested documentation updates in the Promptless dashboard.
For more information on how triggers work in general, see the Triggers documentation.