GitHub pull request bot
Trigger Docs Agent from GitHub pull requests by mentioning @ekline-ai in PR comments or code review threads.
Start documentation sessions without leaving GitHub. Mention @ekline-ai in any pull request comment or review thread, and the bot generates a documentation draft linked to the PR context.
How it works
Section titled “How it works”When you mention @ekline-ai in a PR comment, the bot:
- Reacts with a :eyes: emoji to acknowledge your request.
- Posts a reply with a link to the EkLine editor where it creates the draft.
- Generates documentation based on your prompt and the PR context.
- Updates the reply with a link to the docs pull request when ready.
The bot works with any type of PR comment. When you mention @ekline-ai on a review comment attached to specific code lines, the agent also receives the file path and diff context for those lines.
Prerequisites
Section titled “Prerequisites”Before you begin, you need:
- An EkLine organization account.
- The EkLine GitHub App installed on your repository.
- Docs Agent access enabled for your organization.
Trigger the bot from a PR comment
Section titled “Trigger the bot from a PR comment”-
Open a pull request on a repository where the EkLine GitHub App is installed.
-
Write a comment on the PR that mentions
@ekline-aifollowed by your documentation request.@ekline-ai Create a migration guide for the database schema changes in this PR. -
The bot reacts with :eyes: to confirm it received your request.
-
A reply appears with a link to the EkLine editor session where the documentation is being drafted.
-
Review and edit the draft in the EkLine editor.
-
When the agent finishes, it opens a docs pull request on your configured documentation repository. The bot updates its reply with a link to the docs 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.
-
Start a review on the pull request, or view the Files changed tab.
-
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. -
The bot reacts with :eyes: and replies in the review thread.
-
The agent receives the file path and diff hunk for the lines you commented on, along with your prompt.
-
Review the generated draft in the EkLine editor and the resulting docs PR.
What the bot posts
Section titled “What the bot posts”The bot communicates progress through comments on the pull request:
| Stage | What the bot posts |
|---|---|
| Request received | :eyes: reaction on your comment |
| Session started | Reply with a link to the EkLine editor |
| Docs PR created | Updated reply with a link to the new documentation pull request |
| Docs PR updated | Updated reply noting that the bot updated the existing docs PR with new changes |
| Error | Reply with an error message describing what went wrong |
If you mention the bot again on the same PR, it resumes the existing session rather than starting a new one.
Write effective prompts
Section titled “Write effective prompts”The quality of your prompt determines the quality of the output. The bot strips the @ekline-ai mention and passes the rest of your comment as the prompt.
| Instead of\u2026 | Try\u2026 |
|---|---|
| ”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.
Follow-up comments
Section titled “Follow-up comments”After the bot creates a docs PR, you can continue the conversation:
- Comment on the source PR — Mention
@ekline-aiagain to refine or extend the documentation. The bot resumes the existing session and updates the docs PR. - Comment on the docs PR — Mention
@ekline-aion the generated docs PR to request changes to the draft. The agent receives the docs PR context and pushes new commits.
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
| Bot does not respond | Verify that the EkLine GitHub App is installed on the repository. Check that the GitHub PR integration is enabled for your organization. |
| Bot reacts but does not reply | The agent may be processing your request. Wait up to a minute. If no reply appears, try again or contact support@ekline.io. |
| ”Error” reply from the bot | Read the error message for details. Common causes: session conflicts, service unavailability. Try again or contact support. |
| Docs PR not created | The agent creates a PR when it generates file drafts. If your prompt is ambiguous, the agent may not produce files. Give a more specific prompt. |
| Bot responds to the wrong person | The bot responds to any mention of @ekline-ai in the PR. Each mention triggers or resumes a session. |
Next steps
Section titled “Next steps”- 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.