Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 21 additions & 29 deletions settings/github.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,45 @@ icon: "github"

Mintlify uses a GitHub App to automatically sync your documentation with your GitHub repository.

## Installation
## Installing the GitHub App

Install the Mintlify GitHub App on the GitHub account or organization that owns your docs repository. Installing a GitHub App requires either
organization ownership or admin permissions in a repository. If you lack the necessary permissions, the repository owner will need to approve the request.
Install the Mintlify GitHub App on the GitHub account or organization that owns your docs repository. You must have organization ownership or admin permissions in a repository to install the app. If you lack the necessary permissions, the repository owner must approve the installation request.

You can install the Mintlify GitHub App through your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app).
Install the Mintlify GitHub App through your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app).

<Tip>
We recommend granting access only to the repository where your docs are hosted.
</Tip>

<Frame>
<img className="h-80" src="/images/github/select-repos.png" />
<img className="h-80" alt="Mintlify GitHub App installation page with the 'Only select repositories' option selected." src="/images/github/select-repos.png" />
</Frame>

## Permissions

When you install the GitHub app, you will be prompted to grant the following permissions:

- **Read** access to `metadata`
- **Read** and **write** access to `checks`, `code`, `deployments`, `pull requests`,
and `workflows`
Read permissions:
* `metadata`: Basic repository information

These permissions are leveraged to provide a seamless experience when managing
your docs.

When you make a commit to the branch you configured as your docs deployment
branch, we fetch the contents of the files changed to update your docs. To
accomplish this we need read access to your `contents`.

When pull requests are created we create a check and preview deployment which is
why we need write access to `checks` and `deployments`.

Inside the Mintlify web editor, Mintlify works on your behalf to create branches
and pull requests which is why we need write access to `pull requests` and
`workflows`.
Read and write permissions:
* `checks`: Create status checks on pull requests
* `code`: Read file changes when you commit to your docs branch
* `deployments`: Generate preview deployments for pull requests
* `pull requests`: Create branches and pull requests from the web editor
* `workflows`: Manage GitHub Actions for docs deployments

<Info>
If you are concerned about the write permissions, the GitHub App will only
have access to the repos you give it access to _and_ if you have branch
protections on it _cannot_ push directly to your branches - it abides by your
branch protection rules.
The app only accesses repositories that you explicitly grant it access to. If you have branch protection rules enabled, the app cannot push directly to protected branches.
</Info>

## Repositories Installations
## Managing repository access

When installing our GitHub App, you can grant access to all of your repositories or specific ones. We recommend only granting access to the repositories where your documentation is located. You can modify this selection anytime in your [GitHub app settings](https://github.com/apps/mintlify/installations/new).

## Configuring docs source

When installing our GitHub app, you will be prompted to select all repositories
or a subset of them. This selection can be changed at any time by going to the
[GitHub app settings](https://github.com/apps/mintlify/installations/new).
Change the organization, repository, or branch that your documentation is built from in the [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) section of your dashboard.

## Troubleshooting

Expand Down