# Have an Agent watch your pull requests

> Add Gitta, make sure the Team's GitHub connection reaches your repositories, and ask it which pull requests are waiting, how their checks are doing, and to merge once approved.

Source: https://air.build/docs/connect/track-pull-requests-with-an-agent/

Gitta is a specialist Agent for pull requests on GitHub. In the **New Agent** sheet it's listed as "like a GitHub Manager", with the line "Keeps track of your pull requests."

Its bio, shown on its profile: "The Team's pull requests on GitHub: checks their status, lists what's waiting to merge and who needs to approve, and merges once an approver says so."

Unlike the other specialists, Gitta has no Connection of its own, so adding it posts no sign-in card. It uses the Team's GitHub connection, like every Agent in the Team: it works on GitHub as the Team owner's GitHub account, through the AirBuild GitHub App.

## Before you start

The Team's owner connects GitHub and chooses which repositories the AirBuild GitHub App can reach. For a private repository, and for anything that writes, such as a merge, the App has to reach the repository. Public repositories can be read without it. See [Connect your GitHub account](https://air.build/docs/team/connect-github-account/).

If GitHub isn't connected yet, you can still add Gitta. When it can't reach a repository, it asks in the chat (see [Questions](https://air.build/docs/connect/track-pull-requests-with-an-agent/#questions)).

## Add Gitta

Tap **+** (on the Mac, click it) and choose **New Agent**. Under **Specialists**, tap **Add** on **Gitta**'s row. It joins your Team as **@github**. If your Team already has an Agent with the ID github, see [Add an Agent to your Team](https://air.build/docs/team/add-an-agent/#when-the-id-is-taken).

## Ask Gitta for something

Mention **@github** in a chat it's in, or write in your own chat with it. See [Work with your Agents in chat](https://air.build/docs/projects/work-with-agents-in-chat/#mention-an-agent). Name the repository as owner/repo, or paste a pull request's link.

Things to ask, going by its bio:

- "@github, which pull requests in example-org/example-app are waiting to merge?"
- "@github, are the checks on #42 passing?"
- "@github, who still needs to approve the login pull request?"
- "@github, merge #42 once it's approved."

To hear about open pull requests every morning, give Gitta a Schedule. See [Schedule work for an Agent](https://air.build/docs/agents/schedule-agent-work/).

## Merging

Gitta's bio says it merges once an approver says so. A repository's branch rules on GitHub, such as required reviews or checks, still apply, as they do to the account it works as.

## Questions

**Gitta posted a GitHub card**

It can't reach a repository. The card says what's missing, for example "Needs access to the repository _owner/repo_. Grant it to the AirBuild app on GitHub." Only the Team's owner can answer it: tap **Grant Access** and grant it on GitHub. See [Connect your GitHub account](https://air.build/docs/team/connect-github-account/#when-an-agent-asks-in-a-chat).

**I'm not the Team's owner**

Gitta uses the owner's GitHub connection, not yours. Ask the owner to connect GitHub or grant the repository. If the Team's owner changes, the Agents switch to the new owner's GitHub.

**An organization's repositories aren't reachable**

The AirBuild GitHub App has to be installed on that organization, and the organization may need single sign-on. See [Connect your GitHub account](https://air.build/docs/team/connect-github-account/#single-sign-on).

**How do Agents reach GitHub?**

Every Agent in a Team has `git` and `gh`, GitHub's command-line tool, already signed in through the Team's GitHub connection. See [gh and git in a Team](https://air.build/docs/cli/gh-git/).
