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

# Connect GitHub repos and issues to Knoq

> Connect GitHub to search pull requests, issues, code, and repository metadata through Knoq's AI chat.

GitHub is where your engineering team's work takes shape — in pull requests, issues, commit history, and code. Connecting GitHub to Knoq lets you ask natural language questions against all of that: find the PR that introduced a bug, summarize open issues blocking a release, or understand what changed in a module last week, without leaving the chat or switching context.

## What Knoq can access

Knoq reads from your GitHub account using secure OAuth, scoped to repositories and organizations your account can access:

* **Issues** — titles, descriptions, labels, assignees, comments, and status
* **Pull requests** — diffs, review comments, CI status, and merge state
* **Commits and diffs** — commit messages, authors, and code changes in accessible branches
* **Repository metadata** — descriptions, topics, branch names, and contributor lists
* **Code search** — searching the contents of files across accessible repositories
* **Organization and team metadata** you have permission to view

<Info>
  Knoq queries GitHub in real time. Repository content is not indexed or stored — searches happen live against the GitHub API, so results always reflect the current state of your codebase.
</Info>

### What Knoq cannot access

* Repositories you do not have at least read access to
* Private repositories in organizations that have not authorized the OAuth app
* Repository secrets, environment variables, or Actions workflow run logs beyond what the API exposes to your account
* Resources outside the OAuth scopes granted during authorization

## Connect GitHub

<Steps>
  <Step title="Open Settings → Integrations">
    In Knoq, click your avatar in the top-right corner, select **Settings**, then choose **Integrations** from the left sidebar.
  </Step>

  <Step title="Find the GitHub connector">
    Locate the **GitHub** card in the gallery. Use the **Dev Tools** category chip to filter the list.
  </Step>

  <Step title="Click Connect">
    Click the GitHub card and press **Connect**. Knoq redirects you to GitHub's OAuth authorization page.
  </Step>

  <Step title="Authorize Knoq on GitHub">
    GitHub shows you the permissions Knoq is requesting. Review the scopes — they are read-only for most operations — then click **Authorize**. If your personal account belongs to a GitHub organization, you may also see an option to grant organization access (see [Organization access](#organization-access) below).
  </Step>

  <Step title="Return to Knoq">
    GitHub redirects you back to **Settings → Integrations**. The GitHub card shows a green **Connected** badge. Head to the chat and try your first GitHub query.
  </Step>
</Steps>

## Example queries

Once GitHub is connected, ask Knoq questions like these in the chat:

```
Summarize open pull requests in the backend repo that are waiting for review
```

```
Find the commit that introduced the null pointer exception in the auth module
```

```
What changed in the payments service last week?
```

```
Which issues are labeled "bug" and assigned to the infrastructure team?
```

```
Show me all open PRs targeting the main branch with failing CI checks
```

```
What was merged between the last two releases in the frontend repo?
```

Knoq reads the relevant GitHub data, synthesizes an answer, and links back to the specific issues, PRs, or commits it referenced.

## Organization access

If your repositories live in a GitHub organization — rather than your personal account — you may need to explicitly grant Knoq access to that organization during the OAuth flow.

On GitHub's authorization screen, look for the **Organization access** section. Organizations you own will have a **Grant** button; organizations you're a member of (but don't own) will show a **Request** button. Click **Request** to send an approval request to your organization's GitHub admin.

<Note>
  Organization admin approval is a GitHub platform requirement, not a Knoq limitation. If you need access urgently, ask your GitHub organization admin to approve the OAuth app in **GitHub Organization Settings → Third-party access**. Once approved, return to **Settings → Integrations** in Knoq and click **Connect** again — you won't need to re-authorize from scratch, just repeat the flow to capture the updated org scope.
</Note>

If your organization has an **IP allowlist** or enforces **SAML single sign-on (SSO)**, you may also need to authorize the Knoq OAuth app for SSO access from within GitHub after completing the initial flow. GitHub will prompt you with a link to do this if required.

## Permissions

Knoq requests **read-only** access to your GitHub repositories and metadata. It cannot make changes to your codebase or repository settings.

| What Knoq can do                    | What Knoq cannot do                   |
| ----------------------------------- | ------------------------------------- |
| Read issues, PRs, commits, and code | Push commits or create branches       |
| Search file contents across repos   | Merge or close pull requests          |
| Read repository metadata and topics | Modify repository settings or secrets |
| Read organization team membership   | Add or remove collaborators           |
| Read CI check statuses              | Trigger or cancel Actions workflows   |

<Warning>
  Knoq will never push code, merge pull requests, modify repository settings, or take any write action on your GitHub repositories or organizations. If you see unexpected repository activity, it is not originating from Knoq.
</Warning>
