From d64430b466cf462eed43a02f788d9060bfa241ca Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 01:31:45 +0000 Subject: [PATCH] Documentation updates from Promptless --- docs/changelogs/2025-06.md | 5 ++ docs/core-concepts/triggers.md | 8 +++ docs/getting-started.mdx | 8 +-- docs/integrations/gitlab.mdx | 107 +++++++++++++++++++++++++++++++++ docs/integrations/index.mdx | 1 + 5 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 docs/changelogs/2025-06.md create mode 100644 docs/integrations/gitlab.mdx diff --git a/docs/changelogs/2025-06.md b/docs/changelogs/2025-06.md new file mode 100644 index 0000000..d7ff677 --- /dev/null +++ b/docs/changelogs/2025-06.md @@ -0,0 +1,5 @@ +# June 2025 + +## New GitLab Integration + +We've added a new GitLab integration that allows you to trigger documentation updates from GitLab merge requests and publish documentation changes back to GitLab repositories. This integration provides comprehensive access to all projects within your accessible GitLab groups. \ No newline at end of file diff --git a/docs/core-concepts/triggers.md b/docs/core-concepts/triggers.md index 0a5ef94..22b17f4 100644 --- a/docs/core-concepts/triggers.md +++ b/docs/core-concepts/triggers.md @@ -14,6 +14,14 @@ When configured, Promptless automatically runs whenever a new pull request is op During the review process, if you need additional changes or have specific requests for the documentation updates, you can use the follow-on request feature. This allows you to provide additional instructions or feedback to Promptless, which will then process your request and suggest updated changes based on your input. +### GitLab Merge Requests + +Similar to GitHub, Promptless can be triggered by merge requests in GitLab projects. When a new merge request is opened in your specified GitLab projects, Promptless analyzes the changes and suggests documentation updates if needed. You can configure specific directories to monitor for changes, allowing you to focus documentation efforts on the most relevant parts of your codebase. + +The workflow for GitLab triggers follows the same pattern as GitHub triggers, with options for auto-publishing and follow-on requests to streamline your documentation process. Promptless will add comments to your GitLab merge requests indicating whether documentation updates were necessary, and if so, provide links to review those changes. + +GitLab integration provides access to all projects within your accessible groups, making it easy to manage documentation across your entire GitLab organization. + ### Bitbucket Pull Requests Similar to GitHub, Promptless can be triggered by pull requests in Bitbucket repositories. When a new pull request is opened in your specified Bitbucket repositories, Promptless analyzes the changes and suggests documentation updates if needed. You can configure specific directories to monitor for changes, allowing you to focus documentation efforts on the most relevant parts of your codebase. diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index eddeb4d..5124b63 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -15,9 +15,9 @@ Before you start, you'll need a Promptless account. If you don't have one yet, c Once you're signed into the [Promptless dashboard](https://app.gopromptless.ai/), visit the [Integrations page](https://app.gopromptless.ai/integrations). From there, you should set up the following integrations: -* Your triggers (e.g. Github, Bitbucket, or Slack). You can trigger Promptless from new Github/Bitbucket PRs and from the Promptless Slack message action (primarily used in Slack Connect support channels). If you're connecting Github or Bitbucket, make sure to give Promptless access to your source code repos that you want Promptless to be triggered from, as well the repo containing your docs. +* Your triggers (e.g. Github, GitLab, Bitbucket, or Slack). You can trigger Promptless from new Github/GitLab/Bitbucket PRs and from the Promptless Slack message action (primarily used in Slack Connect support channels). If you're connecting Github, GitLab, or Bitbucket, make sure to give Promptless access to your source code repos that you want Promptless to be triggered from, as well the repo containing your docs. * [Optional] Your context sources (e.g. Linear, Jira, Google Drive). You can connect Promptless to your Linear, Jira, Google Drive, or Slack accounts to get context from these sources. The more relevant context you provide, the better Promptless will be at suggesting changes. -* Your docs (typically a Github or Bitbucket repo). If your docs are in a directory within a repo, you'll be able to set the directory when you create a project. If your docs are hosted by [Readme](https://readme.com/) and are not synced to Github, use the Readme API key integration. +* Your docs (typically a Github, GitLab, or Bitbucket repo). If your docs are in a directory within a repo, you'll be able to set the directory when you create a project. If your docs are hosted by [Readme](https://readme.com/) and are not synced to Github, use the Readme API key integration. If you don't see the integration you need, please let us know at [help@gopromptless.ai](mailto:help@gopromptless.ai). Promptless adds new integrations every week. Once you're set up, your Integrations page might look like this: @@ -27,11 +27,11 @@ If you don't see the integration you need, please let us know at [help@gopromptl Once you've set up integrations, visit the [Projects page](https://app.gopromptless.ai/projects). Creating a project will let Promptless index your docs and find the right place to sugggest a change. You can set up different types of triggers for different projects: - Slack: Promptless runs when you tag it or when you use the message shortcut in Slack -- Github/Bitbucket: Promptless runs upon opening a PR in any of the source repos you specify in the Project +- Github/GitLab/Bitbucket: Promptless runs upon opening a PR in any of the source repos you specify in the Project If you want to have both triggers, create two separate projects with all other information the same. You'll also be able to set up context sources for each project, to instruct Promptless on which Linear Teams, Jira Projects, Google Drive folders, etc to search when generating suggestions. -For GitHub or Bitbucket-based projects, you can enable auto-publish to automatically create pull requests with documentation changes. When enabled, Promptless will create a new PR with suggested documentation updates whenever it detects necessary changes, rather than requiring manual review and PR creation through the dashboard. +For GitHub, GitLab, or Bitbucket-based projects, you can enable auto-publish to automatically create pull requests with documentation changes. When enabled, Promptless will create a new PR with suggested documentation updates whenever it detects necessary changes, rather than requiring manual review and PR creation through the dashboard. When reviewing documentation updates in the dashboard, you can use the follow-on request feature to ask Promptless for additional changes or refinements to its initial suggestions. This is particularly useful when you want to provide specific feedback or request modifications to the proposed documentation updates. diff --git a/docs/integrations/gitlab.mdx b/docs/integrations/gitlab.mdx new file mode 100644 index 0000000..9bd7a54 --- /dev/null +++ b/docs/integrations/gitlab.mdx @@ -0,0 +1,107 @@ +--- +sidebar_position: 4 +--- + +# GitLab Integration + +**Used for: Triggers and Publishing** + +Promptless integrates with GitLab to automatically update your documentation when merge requests are created or updated. This integration connects to your GitLab groups and projects, providing comprehensive access to all projects within your accessible groups. + +## Installation + +To set up the GitLab integration: + +1. Navigate to the **Integrations** page in your Promptless dashboard +2. Click on **Connect** next to the GitLab option +3. Enter your **Group Access Token** with appropriate permissions + +:::tip Creating a GitLab Group Access Token +To create a group access token with the right permissions: +1. Go to your GitLab group settings +2. Navigate to **Access Tokens** under **Settings** +3. Click **Add new token** +4. Give it a descriptive name like "Promptless Integration" +5. Set an appropriate expiration date +6. Select the following scopes: + - **read_api**: To read group and project information + - **read_repository**: To access repository content + - **write_repository**: To create merge requests for documentation updates +::: + +## How GitLab Integration Works + +When you connect GitLab to Promptless, the system: + +1. **Discovers Your Groups**: Promptless identifies all GitLab groups accessible with your token +2. **Determines Primary Group**: Automatically selects the top-level group (with the shortest path) as your primary group +3. **Fetches All Projects**: Retrieves comprehensive information about all projects across all accessible groups +4. **Organizes Project Data**: Stores project IDs, names, and full paths for easy selection and management + +This approach ensures you have access to all relevant projects within your GitLab organization, regardless of which specific group they belong to. + +## Project Setup + +After connecting your GitLab account, you can configure projects in Promptless: + +### Repository Selection + +When creating a project with GitLab as a trigger source: + +1. **Select Projects**: Choose from all projects accessible through your group token +2. **Project Display**: Projects are shown with their full path (e.g., `group/subgroup/project-name`) +3. **Project Identification**: Each project is uniquely identified by its GitLab project ID + +### Directory-Specific Triggers + +You can configure Promptless to only trigger documentation updates when changes are made to specific directories in your GitLab projects: + +1. In your project configuration, select the GitLab project +2. Under **Advanced Options**, enable **Directory-Specific Triggers** +3. Enter the directories you want to monitor, separated by commas (e.g., `src/api, docs/reference`) + +This is particularly 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 + +## Authentication Model + +The GitLab integration uses group access token authentication: + +- **Group Access Token**: A secure token with specific permissions for the Promptless integration +- **Group-Level Access**: Provides access to all projects within the accessible groups +- **Project Scope**: Limited to projects within groups where the token has permissions + +This authentication model ensures that Promptless has appropriate access to your GitLab projects while maintaining security boundaries. + +## Group and Project Management + +The GitLab integration provides visibility into your GitLab organization structure: + +- **Primary Group Display**: Shows your main group name in the integrations list +- **Project Count**: Displays the total number of accessible projects +- **Project Organization**: Projects are organized by their full GitLab paths for easy identification + +If you add new projects to your GitLab groups or modify group permissions, the project list will be updated automatically when you reconnect or refresh the integration. + +## Usage + +Once configured, the GitLab integration works as follows: + +1. **Merge Request Monitoring**: When a merge request is opened or updated in your monitored projects, Promptless is automatically triggered +2. **Change Analysis**: Promptless analyzes the changes to determine if documentation updates are needed +3. **Documentation Generation**: If updates are needed, Promptless generates appropriate documentation changes +4. **Merge Request Comments**: Promptless adds a comment to your GitLab merge request with a link to review the documentation changes +5. **Review Process**: You can review and approve the suggested documentation updates in the Promptless dashboard + +## Project Display + +In the Promptless dashboard, GitLab projects are displayed with: +- **GitLab Logo**: Visual identification of GitLab-sourced projects +- **Project Names**: Full project names as they appear in GitLab +- **Path Information**: Complete project paths for easy identification + +This makes it easy to distinguish between projects from different version control systems and understand the full context of each project. + +For more information on how triggers work in general, see the [Triggers](/core-concepts/triggers) documentation. \ No newline at end of file diff --git a/docs/integrations/index.mdx b/docs/integrations/index.mdx index 63b6c0b..2f46640 100644 --- a/docs/integrations/index.mdx +++ b/docs/integrations/index.mdx @@ -12,6 +12,7 @@ Some integrations can be used for multiple purposes. Some integrations are in a ## Available Integrations - [GitHub](./github): Trigger based on Pull Requests, research based on code functionality, and publish documentation to GitHub repos +- [GitLab](./gitlab): Trigger based on Merge Requests and publish documentation to GitLab repos - [Slack](./slack): Trigger based on DMs or message actions in Slack - [Zendesk](./zendesk): Trigger based on resolved support tickets, and publish to Zendesk help center - [Linear](./linear): Look up relevant Linear issues and projects within a team when being triggered