Skip to content

Generate documentation from GitHub pull requests

Start documentation sessions without leaving GitHub. Mention @ekline-ai in a pull request comment or review thread, and the bot generates a documentation draft linked to the PR context.

When you mention @ekline-ai in a PR comment, the bot:

  1. Reacts with a :eyes: emoji to acknowledge your request.
  2. Posts a reply with a link to the EkLine editor where it creates the draft.
  3. Generates documentation based on your prompt and the PR context.
  4. Replies with its answer when it finishes. If it opened or updated a docs pull request, the reply includes a link to it.

The bot works in pull request comments and in review comments on code lines, not in comments on issues.

Before you begin, you need:

  • An EkLine organization account.
  • The EkLine GitHub App installed on your organization.
  • Write or admin access to the repository, or membership of its GitHub organization. The bot answers anyone else with a note that it responds only to members and collaborators.
  1. Open a pull request on a repository where the EkLine GitHub App is installed.

  2. Write a comment on the PR that mentions @ekline-ai followed by your documentation request.

    @ekline-ai Create a migration guide for the database schema changes in this PR.
  3. The bot reacts with :eyes: to confirm it received your request.

  4. A reply appears with a link to the EkLine editor session where the agent drafts the documentation.

  5. Review and edit the draft in the EkLine editor.

  6. When the agent finishes, it replies on your PR. For a documentation change, the reply links to a docs pull request in a repository under Where EkLine writes. If the reply has no link, open the session in the EkLine editor and click Raise PR.

Trigger the bot from a code review comment

Section titled “Trigger the bot from a code review comment”

For more targeted documentation, mention the bot on specific lines in a code review.

  1. Start a review on the pull request, or view the Files changed tab.

  2. Select the line or lines you want to reference, and add a review comment that mentions @ekline-ai.

    @ekline-ai Document this new API endpoint, including the request and response schema.
  3. The bot reacts with :eyes: and replies in the review thread.

  4. The agent reads the file path and the diff for the lines you commented on, along with your prompt.

  5. Review the generated draft in the EkLine editor and the resulting docs PR.

StageWhat the bot posts
Request received:eyes: reaction on your comment
Session startedReply with a link to the EkLine editor
Agent finishedA new reply with the agent’s answer, in the same review thread when you commented on code lines. If the agent opened or updated a documentation pull request, the reply links to it
ErrorReply that reads “Sorry, I encountered an error while processing your request. Please try again later.”

If you mention the bot again on the same PR, it resumes the existing session rather than starting a new one.

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 PR”
“update docs”“Update the authentication guide to cover the OAuth flow changes in this PR”
“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 PR.
  • Mention existing documentation to update if applicable.
  • Give any audience context, such as whether it’s for developer docs or an end-user guide.

After the bot creates a docs PR, mention @ekline-ai again to continue the conversation. You can comment on either the source pull request or the generated docs PR. The bot resumes the existing session and keeps the context of the documentation it already produced. On the docs PR, it reacts with :eyes: but posts no editor link.

The 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?”, the agent replies with an answer. It does not edit files or push commits.
  • Change requests: When you ask for a documentation change, the agent edits the docs and pushes new commits to the linked docs PR, or opens one if none exists yet.

To change the documentation, describe the change you want.

  • 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 > GitHub to find it. See Find a past session.
IssueSolution
Bot does not respondVerify that the EkLine GitHub App is installed on the repository, and that you mentioned the bot on a pull request, not an issue.
Bot replies that it responds only to members and collaboratorsAsk a repository admin to give you write access, or to add you to the GitHub organization.
Bot reacts but does not replyThe agent may still be processing your request, and a session can take several minutes. If no reply appears, try again or contact support@ekline.io.
“Sorry, I encountered an error” reply from the botTry again. If the error repeats, contact support@ekline.io.
Docs PR not createdThe agent opens a docs PR only for a documentation change, not for a question. If your prompt is unclear, the agent may not change any files, so give a more specific prompt. When Auto-create documentation PRs is off in the repository’s review rules, the drafts stay in the editor. To open the PR yourself, open the session and click Raise PR.
  • Create documentation: Generate documentation from your codebase, videos, and external sources.
  • Slack bot: Create documentation drafts directly from Slack.
  • Integrations: Connect Notion, Linear, Jira, and other tools for richer context.

Built on Potluck Docs, our open source template.