# Connecting GitHub and Gitea

> Install the GitHub App or connect a self-hosted Gitea, and what happens when a connection drops.

Nudge reads pull requests, reviews and CI status from your git host, and requests reviews on it. It never reads or stores your code.

## GitHub

On **Connections**, choose **Connect GitHub**. GitHub asks which account or organisation to install the Nudge app on, and which repositories it can see. You can change that list on GitHub at any time. Nudge picks up the change on its own.

The app reads pull requests, reviews and CI checks, and requests reviewers, so the reviewer Nudge picks shows up on the pull request too.

## Gitea (self-hosted)

On **Connections**, choose **Connect Gitea** and enter:

-   **Instance URL**: your Gitea’s address. It must be reachable from the internet.
-   **Access token**: create one in Gitea under Settings → Applications, with the `read:user` and `write:repository` scopes.

Nudge adds a webhook to each repository you turn on, so the token’s owner needs admin rights on those repositories.

## When a connection stops working

Nudge checks each connection regularly, and again before every nudge.

-   **Unreachable**: the host didn’t answer, which is often a short outage. Nudge keeps trying. If it’s still unreachable after a day, **Connections** asks you to check the host or reconnect.
-   **Revoked**: the app was uninstalled or the token no longer works. Reconnect to carry on.

If you disconnect a host, its repositories and pull requests are hidden and Nudge stops chasing them. When you reconnect, Nudge catches up straight away: pull requests closed in the meantime are closed in Nudge too, and open ones are chased again.

> Before each nudge, Nudge checks with the host that the pull request is still open and still needs a review, so nobody is chased for work that’s already done.

Next: [Connecting Slack](https://nudgepr.dev/docs/connect-slack).
