# GitHub

> June works on your repositories as you: reads code, reviews and opens pull requests and issues, pushes branches. From Slack it uses GitHub's API, not git.

Source: https://www.dearjune.ai/docs/integrations/github

Connect GitHub to read code, review pull requests, open issues and push
branches through June, under your GitHub account. Name the repository and
branch in your request so June works in the right place.

1. On the **Integrations** page, choose **Connect** on the GitHub row.
2. GitHub asks you to authorize June for your account, then sends you back.
3. Ask June for something in a repository.

> Example prompt: Review the open pull request on the website repo and comment on anything risky.

> Example prompt: Open an issue for the flaky checkout test, with the steps to reproduce it.

> Example prompt: What changed on main in acme-studio/website this week?

June asks for what the GitHub command-line tool asks for: your
repositories and read access to your GitHub organizations, plus workflow
files, so it can push changes to them too.
A GitHub organization that restricts third-party apps has to approve June
before June reaches its private repositories; GitHub shows the request when
you authorize.

## What June can do

It depends on where you ask.

**In a chat in June**, your own or an organization's, and in any schedule
you set up with `terminal` on (even from a Slack channel in an
organization's workspace), June uses `git` and the GitHub command-line
tool in [June's sandbox](/docs/how-june-works/sandbox), signed in as you.
It can:

- clone a repository and read its code, history, issues and pull requests,
- comment on and review pull requests,
- open issues and pull requests, and push branches.

**In an organization's chats and projects** the members share one sandbox,
and June signs it in as whoever wrote the message it is answering, with
their GitHub there: the account from their **Integrations** page unless it
is **Personal only**, or one connected in the organization with **Use work
account** ([what reaches where](/docs/integrations#personal-or-organization)).
Commits June makes there carry that person's GitHub name. A member with no
GitHub there gets a link to connect it; June never uses someone else's.

**In Slack** June has no sandbox. It works through your connection's GitHub
tools instead, so it can do what GitHub's API lets your account do: read
repositories, files and history, open and update issues and pull requests,
assign people, comment and review, and start workflows. Where GitHub offers
it to your account, these include GitHub's own tool set for issues, pull
requests, reviews, Actions runs and their logs, projects, releases and
security alerts. June has the same tools in its chats too.

## More than one GitHub account

You can connect more than one GitHub account, but June's sandbox uses one:
the only connected one, or, if there are several, the one named `default`.
In an organization a work account you connected there comes before your
personal one. To make sure June uses the account you mean, disconnect the
others on the **Integrations** page or, for a work account, on the
organization's page.

## What June does not do

- It reaches only what your GitHub account reaches, within the permissions
  you granted.
- From Slack it does not clone a repository or push code; for work on the
  code itself, ask in a chat in June.
- In its sandbox it has what `git` and the GitHub command-line tool have
  as you, including merging pull requests and deleting branches. Its sandbox
  stops only a `git push` that forces, mirrors or deletes
  ([commands June refuses](/docs/how-june-works/sandbox#commands-june-refuses));
  other sandbox commands follow your
  [approval settings](/docs/how-june-works/connections#a-step-that-needs-your-confirmation).
  Say which branch it should change and what it must leave alone. Its
  GitHub API tools can change data without asking first.
- In an organization's shared sandbox, files an earlier message left there,
  another member's included, stay for the next message.

[Obsidian](/docs/integrations/obsidian) works through this connection: a
vault kept in a GitHub repository is read and written as you.