> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub permissions

> Why Thor asks to write to your repositories, what it can change, and how to approve it.

Thor connects to GitHub through a GitHub App called **Thor Assistant**. It reads your issues, pull requests, and code so it can answer questions and keep work in sync.

Thor now also asks for **Contents: Read and write**. With it, a **doc update** automation can open pull requests that keep your markdown docs current, without anyone pasting a personal access token into Thor.

Until an owner approves, nothing changes. Thor keeps working exactly as it does today.

# What Thor can change

Write access is only used by doc update automations, and only inside the limits you set:

* **Only your doc roots.** Thor edits markdown files in the repositories and paths you set as **Doc roots** on the automation. Nothing else.
* **Only its own branches.** Every change goes on a `thor/doc-update/` branch and arrives as a pull request. Thor never pushes to your default branch.
* **Never merges.** Thor asks the document's owner to review, and a person on your team decides whether it goes in.
* **Short-lived access.** For each run, Thor gets a token from GitHub that expires within the hour and only covers the doc-root repositories.
* **Verified commits.** GitHub signs Thor's commits as Thor Assistant, so they show as **Verified**.

Everything else Thor does with your code, like answering questions and working in a sandbox, stays read-only.

# Approve the update

An owner of the GitHub organization needs to accept the new permission. GitHub emails owners when Thor asks for it.

**1. Open your GitHub App installations**

For an organization, go to `https://github.com/organizations/<your-org>/settings/installations`. For a personal account, go to `https://github.com/settings/installations`.

In Thor, the doc update automation's settings link straight to this page.

**2. Configure Thor Assistant**

Click **Configure** next to **Thor Assistant**. GitHub shows a banner saying Thor Assistant is requesting updated permissions.

**3. Accept the new permissions**

Click **Review request**, check the list, and click **Accept new permissions**.

One approval covers everything Thor is waiting on, so if GitHub lists more than Contents, that's expected.

Once you accept, the **GitHub pull requests** section of your doc update automation says Thor opens pull requests with its GitHub App. You don't need to save anything.

> [!NOTE]
>
> Not using doc update? You can leave the request. Thor keeps working with the access you already gave it.

# If you already use a personal access token

Your doc update automation keeps using its saved token until an owner approves. After that, Thor opens pull requests as Thor Assistant and deletes the saved token after its first successful run. You can then revoke the token in GitHub.

# Doc roots in one GitHub organization

A doc update automation's doc roots must all come from one GitHub organization or account. Thor's access is granted per organization, so one run can only write to one of them. For docs in two organizations, create one automation for each.

# If a ruleset blocks Thor

GitHub rulesets apply to Thor like they do to anyone. If a ruleset targets every branch, Thor can't create its `thor/doc-update/` branches, and the run reports that GitHub refused the change.

The fix is to leave Thor's branches out of the ruleset:

1. Open the ruleset in your repository or organization settings.
2. Under **Target branches**, add an exclusion for `thor/doc-update/**`.
3. Save.

Your default branch keeps its protection, and Thor's changes still reach it only through a reviewed pull request.

> [!WARNING]
>
> Avoid adding Thor Assistant to the ruleset's bypass list instead. A bypass applies to every branch the ruleset covers, including your default branch.

Rulesets that require signed commits don't need any change, since Thor's commits are already verified.

# Remove Thor's access

Uninstall Thor Assistant or narrow its repository access from the same installations page. If you remove a doc-root repository from Thor's access, the doc update automation can no longer save with that repository.

Questions? Email [support@thor.ai](mailto:support@thor.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.