GitHub pull requests are available on every plan with content drafts. Content
drafts are covered in Content drafts.
What DevTune can touch
DevTune connects through the DevTune.ai GitHub App. The app asks for:- Contents: read and write
- Pull requests: read and write
- Metadata: read
devtune/action- followed by eight characters, and to open pull requests from
them. It never commits to your other branches, never merges and never edits
code files. It writes only .md and .mdx files inside a content source’s
folder.
Pages whose copy lives in a CMS or in code (React components, for example)
can’t get a pull request.
Connect GitHub
You need project management permission.- Open your project’s Settings and select the Integrations tab.
- Under Content repositories, select Connect GitHub.
- In GitHub, choose the organization or user account and select the repositories that hold your content.
- Approve the request. You return to DevTune, which shows GitHub connected. Add a content source.
If connecting fails
Content sources
A content source maps a site address onto a place in a repository:
One repository can back several sources with different folders, which covers
monorepos.
To add a content source:
- Under Content repositories, find Add a content source.
- Enter the Site address, such as
docs.example.comorexample.com/blog. DevTune suggests addresses from your project’s domains; select one to use it. - If you connected more than one GitHub account, choose the GitHub account.
- Select the Repository.
- Enter the Branch. Leave it empty to use the repository’s default branch.
- Enter the Folder that holds the pages. Leave it empty for the repository root.
- Select Add source.
DevTune detects the format when you add the source. A
docs.json or
mint.json in the folder marks it Mintlify; anything else is
Markdown. The format shows beside the repository, branch and folder.
A page belongs to the source with the longest matching site address. With
sources for example.com/ and example.com/blog/, a page at
example.com/blog/launch uses the blog source. Each site address can belong to
only one source in a project.
To remove a source, select Remove beside it. Pages under that address can
no longer get pull requests. Open pull requests stay open in GitHub.
Open a pull request from a draft
You need project management permission.- Open an action with a content draft.
- In the Draft section, select Create pull request beside Download markdown.
<path>.mdx, <path>.md, <path>/index.mdx, then <path>/index.md.
For a Mintlify source, it also checks the navigation in docs.json or
mint.json. It applies every section edit to that file. If any change does not
match the file, nothing is written.
Create actions. DevTune writes a new file named from the brief’s target
page: .mdx for Mintlify and .md for Markdown. Mintlify files get title
frontmatter, plus a description taken from the draft’s first paragraph when
it has one. Markdown files get title only. If the brief’s
target is not under any content source, choose a Content source and select
Try again.
The pull request’s title is the action’s title. Its description links the
action and lists the brief’s acceptance criteria under Done when and any
facts the fact check still flags under Facts to verify. For a new page, it
lists what to do Before merging.
DevTune does not open a pull request for a locked
page.
Update a pull request
After you select Generate new draft, the Draft section shows The newest draft is not in this pull request yet. Select Update pull request to push the new version to the same pull request. DevTune applies it to the file as it is on your branch, as a new commit on its own branch. If someone else has pushed to DevTune’s branch, DevTune leaves their commits alone and refuses the update. Make further changes in GitHub.Close a pull request
Select Close pull request and confirm. DevTune closes the pull request in GitHub and deletes its branch, unless someone else has pushed to it. The draft stays in DevTune, and you can create a new pull request. You can close a pull request even after your plan no longer includes GitHub pull requests, or after you remove its content source.Automatic pull requests
Turn on Open pull requests automatically beside a content source. It is off by default. When it is on, each new content draft for a page under that source opens the action’s pull request, or pushes the draft to its open one. The pull request opens as the member who started the draft run, so merging it marks the action live as that member. That member still needs project management permission when the draft finishes; otherwise no pull request opens. If DevTune can’t open an automatic pull request for a page it has found a source for, the reason shows in the action’s Draft section, with the fix from Refusals. If the action already has an open pull request and the new draft can’t be pushed to it, the Draft section shows The newest draft is not in this pull request yet. Select Update pull request to retry. If it fails again, the reason appears there. If the member who started the run no longer has project management permission, no pull request opens and nothing is shown; create it yourself from the Draft section.Merge and close in GitHub
- Merged. The action is marked live with the page’s published URL, and its before/after window opens in Results. An action that was still a suggestion is accepted first. A refresh action uses its own page URL. A new page uses the URL its file serves under the source’s site address. DevTune marks it live as whoever opened the pull request. If that member or API key can no longer manage the action, select Mark live on the action yourself.
- Closed without merging. The pull request is recorded as Closed. The action is unchanged, and you can create a new pull request.
What to expect in your repository
- Preview builds. If your repository builds previews for branches, as Vercel, Netlify and other Git integrations do by default, each push to DevTune’s branch starts one. Use the preview to check the page before merging.
- Navigation. DevTune does not edit site navigation (
docs.json, sidebars or menus). Add a new page to your site’s navigation in the pull request before merging. - Frontmatter. For a new page in a Markdown source, complete the
frontmatter your site’s framework needs. DevTune adds
titleonly. - MDX. In
.mdxfiles, DevTune escapes<and{in the text it writes, outside code, so the page builds.
Disconnect and reconnect
A content source shows Reconnect needed when:- The app is suspended in GitHub. The GitHub account shows Suspended on GitHub. Unsuspend the app in GitHub to restore its sources.
- The app is uninstalled in GitHub. Select Connect GitHub and install it again.
- The source’s repository is removed from the app. Add the repository back to the app in GitHub.
Refusals
When DevTune can’t create, update or close a pull request, the Draft section shows why.API and MCP
Your own agents can do the same with an API key or MCP connection created by a member with project management permission. Creating, updating and closing pull requests needsactions.write; reading the draft and its pull request
needs actions.read:
- API.
POST /api/v2/projects/{projectId}/actions/{actionId}/draft/pull-requestcreates or updates the pull request, andDELETEon the same path closes it.GET /api/v2/projects/{projectId}/actions/{actionId}/draftreturns the pull request with the draft.GET /api/v2/projects/{projectId}/setup/content-sourceslists the project’s content sources and needssetup.read. See Create action draft pull request, Close action draft pull request and List content sources. - MCP.
devtune_create_draft_pull_request,devtune_close_draft_pull_requestanddevtune_get_content_sources. See MCP server.