Skip to content

Generate documentation from GitLab merge requests

Start docs sessions without leaving GitLab. Mention @ekline-ai in a merge request comment, followed by your request. Docs Agent drafts the docs from the merge request.

Before you begin, you need:

  • An EkLine organization account.
  • GitLab connected to EkLine, with a token, your code and documentation projects selected, and the webhook configured. See Connect GitLab.
  • The webhook on your GitLab project sending Comments and Merge request events to EkLine.
  • The Developer role or higher on the GitLab project. Anyone else gets a note that Docs Agent responds only to members and collaborators.

When you mention @ekline-ai in a merge request comment, Docs Agent:

  1. Adds a :eyes: reaction to your comment.
  2. Replies with a link to the EkLine editor where it drafts the docs.
  3. Writes the docs from your prompt and the merge request.
  4. Edits that reply to show its answer when it finishes. For a docs change, it opens a merge request in your docs project.

Docs Agent replies in the thread of the comment that mentioned it.

Trigger Docs Agent from a merge request comment

Section titled “Trigger Docs Agent from a merge request comment”
  1. Open a merge request on a GitLab project you connected to EkLine.

  2. Add a comment that mentions @ekline-ai followed by your docs request.

    @ekline-ai Create a migration guide for the database schema changes in this merge request.
  3. Wait for the :eyes: reaction. It confirms Docs Agent has your request.

  4. Open the editor from the reply. The reply links to the EkLine editor session. Review and edit the draft there.

  5. Review the docs merge request. When Docs Agent finishes, it edits its reply to show its answer. Find the merge request in your docs project, or in the editor session. If there is none, click Raise PR in the editor session.

The quality of your prompt determines the quality of the output. Everything in your comment after @ekline-ai is the prompt.

Instead of…Try…
“document this”“Create an API reference for the new /users endpoint added in this merge request”
“update docs”“Update the authentication guide to cover the OAuth flow changes in this merge request”
“help with docs”“Write a migration guide for the breaking changes to the config schema”

Include specific details:

  • Name the type of documentation you need: API reference, migration guide, tutorial, how-to.
  • Reference specific files or changes in the merge request.
  • Mention existing documentation to update if applicable.
  • Give any audience context, such as whether it’s for developer docs or an end-user guide.

To continue the conversation, mention @ekline-ai again on the source merge request. Docs Agent resumes the same session and keeps what it already wrote. A mention on the docs merge request that EkLine opened starts a new session.

Docs Agent reads each follow-up comment and decides whether you are asking a question or requesting a change:

  • Questions and clarifications: When you ask something like “Where did you get this URL?” or “Why did you change this section?”, Docs Agent replies with an answer. It does not edit files or push commits.
  • Change requests: When you ask for a docs change, Docs Agent edits the docs. It pushes new commits to the linked docs merge request, or opens one if none exists yet.

Docs Agent reads GitLab merge request and issue links in your prompt from your connected projects. Link another merge request or an issue to give it more context:

@ekline-ai Document this endpoint and cross-check the request format against issue #215.

For the full list of what Docs Agent can reference, see Docs Agent integrations.

  • A :eyes: reaction appears on your comment, followed by a reply that links to the EkLine editor.
  • The session appears under Sessions in the EkLine app. Filter by Source > GitLab to find it. See Find a past session.
IssueSolution
Docs Agent does not respondConfirm GitLab is connected and the project is selected in your integration settings. In GitLab, open Settings > Webhooks. Check that the webhook sends Comments and Merge request events, and that its status is healthy.
Docs Agent replies that it responds only to members and collaboratorsAsk a project maintainer to give you the Developer role or higher.
Reaction appears but no replyDocs Agent may still be working. A session can take several minutes. If no reply appears, mention @ekline-ai again or contact support@ekline.io.
Reply says “I couldn’t access GitLab with the stored access token”Add a new token in Connect GitLab. Confirm the status shows Token is set, then try again.
“Sorry, I encountered an error” replyTry again. If the error repeats, contact support@ekline.io.
No docs merge request createdDocs Agent opens a merge request only for a docs change, not for a question. If your prompt is unclear, it may not change any files, so give a more specific prompt. To open the merge request yourself, open the session and click Raise PR.
  • Connect GitLab: Add a token, select projects, and configure the webhook.
  • GitHub PR bot: Trigger Docs Agent from GitHub pull requests.
  • Create documentation: Generate documentation from your codebase, videos, and external sources.
  • Integrations: Connect Slack, Notion, Jira, and other tools for richer context.

Reply to your welcome email or contact support@ekline.io. We read every message.

Built on Potluck Docs, our open source template.