diff --git a/ai/agent.mdx b/ai/agent.mdx index 04a362618..285035b1d 100644 --- a/ai/agent.mdx +++ b/ai/agent.mdx @@ -116,19 +116,6 @@ Use broad prompts for general content maintenance like fixing typos, updating re - `@mintlify Find and fix all typos in the docs` - `@mintlify change all unordered lists to use * instead of -` -## Specify a domain name - -If you have multiple documentation sites, include the `subdomain` parameter in your message to specify which documentation set the agent should work on. - -To find your domain name, look at your dashboard URL for the documentation set you want to update. The domain name is the last part after your organization name. For example, if your dashboard URL is `https://dashboard.mintlify.com/org-name/domain-name`, your domain name is `domain-name`. - -Use the format `@mintlify subdomain= ` to prompt the agent to work on a specific documentation set. - -Examples: - -- `@mintlify subdomain=public-docs Add a new section to the quickstart about inviting collaborators based on this PR`: Prompts the agent to update the quickstart only on the `public-docs` site. -- `@mintlify subdomain=customer-docs Update the auth docs for the new authentication method`: Prompts the agent to update the auth docs only on the `customer-docs` site. - ## Agent workflows The agent assists with many different documentation tasks. These workflows show some of the ways you can integrate the agent into your documentation process. Try an approach that fits how your team currently works and adapt it to your specific needs. @@ -151,6 +138,22 @@ When you merge a feature pull request, share the PR link with the agent to updat For example: `@mintlify This PR adds a new authentication method. Update the docs to include the new auth flow: [PR link]`. +### Mention @mintlify on any pull request + +You can mention `@mintlify` directly in comments on any pull request in your organization, not just your documentation repository. When you tag the agent on a non-docs PR, it automatically creates a separate pull request in your documentation repository with the requested changes. + +This workflow is useful when you want to update documentation as part of your feature development process without leaving your code review context. + +For example, comment on a feature PR: `@mintlify Document this new API endpoint and add it to the API reference`. + +The agent will: +1. Analyze the PR context and your request +2. Create a new branch in your documentation repository +3. Make the requested documentation changes +4. Open a pull request and comment back on the original PR with a link + +If you make additional requests on the same PR, the agent adds commits to the existing documentation PR rather than creating new ones. + ### Generate release notes from a pull request Prompt the agent with a specific pull request to generate release notes or changelog updates based on the commit history. diff --git a/deploy/github.mdx b/deploy/github.mdx index 1aa7a99a1..4fa31df28 100644 --- a/deploy/github.mdx +++ b/deploy/github.mdx @@ -54,6 +54,23 @@ The app only accesses repositories that you explicitly grant it access to. If yo When installing the GitHub App, you can grant access to all of your repositories or specific ones. We recommend only granting access to your documentation repository and any repositories that you want to provide as context for the agent. You can modify this selection anytime in your [GitHub App settings](https://github.com/apps/mintlify/installations/new). +## Use @mintlify on pull requests + +Mention `@mintlify` in pull request comments to trigger documentation updates directly from your code review workflow. The agent works on both your documentation repository and any other repository in your organization that has the GitHub App installed. + +When you mention `@mintlify` on a pull request in your documentation repository, the agent commits changes directly to the PR branch. + +When you mention `@mintlify` on a pull request in a non-docs repository, the agent: +1. Creates a new branch in your documentation repository +2. Makes the requested documentation changes +3. Opens a pull request and comments back on the original PR with a link + +This allows you to update documentation as part of your feature development process without leaving your code review context. For example, comment on a feature PR: `@mintlify Document this new API endpoint`. + + + Grant the GitHub App access to repositories where you want to use `@mintlify` in PR comments. The agent can only respond to mentions in repositories it has access to. + + ## Configure docs source Change the organization, repository, or branch that your documentation builds from in the [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) section of your dashboard.