# GitHub

GitHub is a platform for hosting and collaborating on code repositories. Connecting GitHub to Duvo lets your assignments read and manage repositories, issues, pull requests, and more using a Personal Access Token.

## Setup

### Prerequisites

* A GitHub account with access to the repositories your assignment needs to work with.
* A Personal Access Token (PAT) generated from your GitHub account settings. Use a fine-grained token scoped to the specific repositories and permissions required.

### Required Permissions

The permissions your token needs depend on what the assignment will do. Common scopes include:

* **Contents** — Read or write files and code in repositories.
* **Issues** — Read or manage issues and comments.
* **Pull requests** — Read or create pull requests and reviews.
* **Metadata** — Required for all fine-grained tokens; allows reading repository metadata.

Grant only the permissions the assignment needs. Avoid using a classic token with broad `repo` scope if a fine-grained token with narrower access is sufficient.

### Connection Fields

| Field                     | Description                                                                                                                                                                   |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Personal Access Token** | A GitHub Personal Access Token with the permissions your assignment needs. Generate one at **Settings → Developer settings → Personal access tokens** in your GitHub account. |

### Third-Party Documentation

* [Creating a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
* [Token permission scopes reference](https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens)

## Capabilities

* **Read repository content** — Access files, directories, branches, and commit history across your repositories.
* **Manage issues** — Create, update, close, and search issues; add labels, assignees, and comments.
* **Work with pull requests** — Open, review, merge, and comment on pull requests.
* **Search code and repositories** — Find files, functions, or content across repositories using GitHub's search API.
* **Retrieve repository metadata** — Read repository details, contributors, topics, and settings.

## Key Benefits

* **Automate developer workflows** — Triage issues, generate release notes, or open pull requests as part of a repeatable assignment.
* **Connect code to business processes** — Link repository activity to project management, reporting, and communication workflows.
* **Minimal setup** — A single Personal Access Token is all that is needed; no OAuth app or admin approval required.

## Works Well With

* **Linear or Asana** — Sync GitHub issues to a project management tool, or create GitHub issues automatically when new work items appear.
* **Slack or Microsoft Teams** — Post pull request summaries or issue updates to team channels as part of a review or release workflow.
* **Confluence or Notion** — Generate documentation or release notes from repository activity and publish them to your team wiki.
