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

# Connect GitHub to Cogno

> Install the Cogno GitHub App so Cogno reads your repos, issues, and pull requests and turns them into proposed tasks.

<img src="https://mintcdn.com/genaxis/oMT3YnoHFDqPiaPK/images/integrations/github-mono.svg?fit=max&auto=format&n=oMT3YnoHFDqPiaPK&q=85&s=c1b61148cc175a3e02fddc259a53addb" alt="GitHub" width="56" height="56" noZoom data-path="images/integrations/github-mono.svg" />

## At a glance

|                    |                                                                                                                                    |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Direction**      | Two-way — Cogno reads repositories, issues, and pull requests, and can act back (for example, merging a pull request you approve). |
| **Connect with**   | The Cogno **GitHub App** — one install per organization.                                                                           |
| **Who can set up** | Any workspace member who can open **Settings** (installing the App needs GitHub org permission).                                   |
| **You'll need**    | A GitHub organization where you can install a GitHub App.                                                                          |

Cogno plugs into the repositories your team already works in. Connect GitHub and Cogno reads pull requests, issues, and commits as they happen, turns them into **proposed tasks**, and can carry out actions like merging a PR you've approved — without pulling you out of your normal workflow.

## Before you start

* You can open **Settings** in the target workspace.
* You can install a GitHub App on the target organization (or an org owner can approve it).
* You know which repositories Cogno should watch.

## Connect GitHub in Cogno

<Steps>
  <Step title="Open the GitHub integration">
    Open **Settings → Integrations** and select **GitHub**.
  </Step>

  <Step title="Install the GitHub App">
    Click **Install GitHub App**. Cogno opens GitHub's installation screen in a new window.
  </Step>

  <Step title="Approve on GitHub">
    Choose the organization and approve the app. On GitHub you can grant all repositories or pick specific ones.
  </Step>

  <Step title="Confirm the organization">
    Back in Cogno, the organization appears under **Organizations**. Connect more with **Add Organization**.
  </Step>
</Steps>

## Choose repositories

<Steps>
  <Step title="Open the organization">
    Select the organization to open its detail page.
  </Step>

  <Step title="Sync the repo list">
    Under **Repositories**, click **Sync Repos** to pull the list from the GitHub App installation.
  </Step>

  <Step title="Select and save">
    Tick the repositories Cogno should watch, then click **Save Selected Repos**.
  </Step>
</Steps>

Only selected repositories send events to Cogno.

## Map GitHub members to workspace members

Under **User Mappings**, click **Sync Users** to pull the organization's members, then map each GitHub member to the matching Cogno **member**. This attributes GitHub activity to the right person.

## What Cogno does with GitHub

|                         |                                                                                                                                          |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Reads your activity** | Cogno ingests pushes, pull requests, issues, PR reviews, and comments from selected repositories.                                        |
| **Proposes tasks**      | That activity becomes **proposed tasks** you accept (**Active**), keep for later (**Backlog**), or send back for context.                |
| **Acts from the task**  | Cogno can comment on an exact diff line, submit a PR review, reply to or resolve review threads, and merge a pull request from the task. |
| **Spans organizations** | Connect several organizations to one workspace.                                                                                          |

## Review pull requests from a task

When a task has an open pull request, use **Review** under **GitHub work** to submit a comment, approve, or request changes. If a reviewer requests changes, Cogno summarizes the feedback on the task and loads the complete live list of unresolved inline threads when you open **Review threads**, so every thread can be replied to or resolved in context.

Use **Comment on diff** to load the pull request's changed files, select an added, removed, or context line, and post a new inline comment. This is the direct path for giving the coding AI an exact file-and-line implementation instruction.

Cogno checks the pull request's latest head commit again before every review write. Inline comments are also checked against the live diff. If the PR changed after the task loaded, refresh the GitHub state and review the new head before submitting.

<Note>
  Reviews, replies, and thread resolution are posted as the connected Cogno GitHub App. Pull request authors cannot approve their own pull requests, so an App-created PR must be approved by a human reviewer. GitHub repository rules also determine whether an App approval satisfies required-review protection.
</Note>

## Manage or remove

* **Manage on GitHub** opens the app's installation settings on GitHub.
* **Remove Integration** removes the connection and all synced data (repositories and member mappings) for that organization.

<Warning>
  Removing an organization deletes its synced repos and member mappings from the workspace. You can reconnect anytime from the integrations page.
</Warning>

## Common states

| State                                                 | Meaning                                     | Next action                                                  |
| ----------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------ |
| Install screen finished but Cogno still shows Install | Cogno hasn't finalized the installation yet | Wait a few seconds, or refocus the Cogno tab                 |
| **Repositories** list is empty                        | Repos haven't been synced yet               | Click **Sync Repos**                                         |
| Events from a repo don't appear                       | The repo isn't selected                     | Select it under **Repositories** and **Save Selected Repos** |
| **User Mappings** is empty                            | Org members haven't been synced             | Click **Sync Users**                                         |

## Reference URLs

* [About GitHub Apps](https://docs.github.com/apps/overview)
* [Installing a GitHub App](https://docs.github.com/apps/using-github-apps/installing-your-own-github-app)

## Related docs

* [Troubleshooting](/docs/troubleshooting)
