GitHub won't connect to OneNotch

Fixes when OneNotch's GitHub screen is empty or says the GitHub CLI isn't installed: install gh, sign in, check token scope and SSO, and turn GitHub on in Settings.

On this page
  1. 1. "GitHub CLI not installed"
  2. 2. Installed, but nothing appears
  3. 3. The GitHub screen is missing
  4. 4. Some repositories or pull requests are missing
  5. 5. The lists look wrong
  6. 6. Approving fails
  7. Several GitHub accounts
  8. 7. Check the CLI itself
  9. FAQs

OneNotch connects to GitHub through the GitHub CLI, so most connection problems are CLI problems. If the GitHub screen says "GitHub CLI not installed", install gh with Homebrew. If it's installed but nothing appears, run gh auth status in Terminal to check you're signed in. If some repositories are missing, your token's scope or organisation single sign-on is the usual cause.

1. "GitHub CLI not installed"

Install it:

brew install gh

OneNotch looks for gh in the usual places: Homebrew on Apple silicon and Intel, MacPorts, Nix and standard system paths. It notices a new install without a restart. If you installed gh somewhere unusual, reinstalling with one of those package managers is the simplest fix.

2. Installed, but nothing appears

Check that the CLI is signed in:

gh auth status

If it says you're not logged in, run gh auth login and follow the prompts. Then open OneNotch's GitHub screen and press R or ⌘R to refresh. See connecting GitHub to OneNotch.

3. The GitHub screen is missing

The GitHub screen is hidden when GitHub is turned off. Turn it on in either place:

  • Settings → Accounts → GitHub → Turn on
  • Settings → General → Show GitHub pull requests

Changes apply immediately. Home's Reviews waiting row also reappears.

4. Some repositories or pull requests are missing

  • Fine-grained token: if gh is signed in with a fine-grained personal access token, it only sees the repositories that token was granted. Grant more repositories, or sign in again with gh auth login using the browser flow.
  • Organisation single sign-on: organisations using SAML SSO may require the token to be authorised for them. OneNotch shows the pull requests it can and adds a note when some can't be shown.
  • Archived repositories are excluded on purpose.
  • Limits: each tab shows up to 25 pull requests.

5. The lists look wrong

  • To review shows open pull requests requesting your review; Your PRs shows open pull requests you authored. Closed and merged pull requests drop out.
  • Data refreshes every two minutes, and when you open the notch if it's older than 30 seconds.
  • OneNotch queries the CLI's default host. GitHub Enterprise Server isn't documented as supported.

6. Approving fails

Approval is offered only on the To review tab and not for drafts. It's sent once with gh pr review --approve; if GitHub refuses, OneNotch shows the reason, such as missing permissions or the pull request being closed. Approve on GitHub to see more detail. See how to approve a pull request on GitHub.

Several GitHub accounts

If you have more than one GitHub account, gh may be signed in to a different one from the account your reviews are requested on. gh auth status shows which account is active. Switch with gh auth switch if you're signed in to several, or sign in again with the right account. OneNotch uses whichever account the CLI is currently using on its default host, so the lists follow that account.

7. Check the CLI itself

If OneNotch still shows nothing, test the CLI directly:

gh pr list --search "review-requested:@me"

If that fails in Terminal, the problem is with gh or your GitHub account, and GitHub's CLI documentation is the place to look. If it works in Terminal but not in OneNotch, see troubleshooting or contact support.

FAQs

Does OneNotch need a GitHub token?

No. It uses the GitHub CLI's sign-in and stores no token itself.

Do I need to restart OneNotch after installing gh?

No. OneNotch picks it up without a restart.

Can I use OneNotch with GitLab or Bitbucket?

No. It works with GitHub through the GitHub CLI.

Why can't I approve my own pull request?

GitHub doesn't allow it, and OneNotch only offers approval on the To review tab.