gh). It uses gh’s login and calls the GitHub API through gh api. It has no account manager or token field of its own and never stores your credentials.
Set up
1
Install gh
Install the GitHub CLI. OpenIDEA looks for it in
OPENIDEA_GH (a full path), then on PATH, then in
/opt/homebrew/bin, /usr/local/bin, /usr/bin, /snap/bin (macOS/Linux) or C:\Program Files\GitHub CLI\gh.exe
(Windows).2
Sign in
Run
gh auth login in a terminal. If you open the Pull Requests tool window while signed out, it shows Not
logged in to GitHub with a Run gh auth login button that runs the command in the built-in terminal. Click
Retry when you are done.3
Open a project with a GitHub remote
The project needs a Git remote on
github.com. With one GitHub remote, OpenIDEA connects to it automatically. With
several, the tool window asks you to pick a Repository; the choice is remembered per project. To switch later,
use Change Repository or Account… in the tool window’s ⋮ menu.Only
github.com is supported. GitHub Enterprise hosts, GitLab and Bitbucket are not.Menu and shortcuts
The Git › GitHub menu (also in the editor context menu under Git) has:- View Pull Requests: opens the Pull Requests tool window.
- Create Pull Request…
- Checkout Pull Request…: checks out the selected pull request, or asks for a number.
- Open on GitHub: opens the selected pull request, or the repository, in the browser.
Browse pull requests
The Pull Requests tool window opens on the left. The first tab lists the repository’s pull requests; each pull request you open gets its own#N tab.
- Search: type text or GitHub search qualifiers and press
Enter. The history button (or⌥↓/Alt+Down) shows your last 10 searches. - Quick Filters (funnel button): Open, Your pull requests, Assigned to you, Review requests.
- Filter chips: State, Author, Label, Assignee, Review and Sort. Press
DeleteorBackspaceon a chip to reset it. - Rows show unread markers, labels, state, merge conflicts, assignee and reviewer avatars, and the count of unresolved comments.
Pull request details
Double-click a pull request (or pressEnter) to open its details tab:
- The title, state and a View Timeline link.
- A commit picker: review all commits together or one commit at a time.
- The source branch, with Checkout, Open in Worktree, Show in Git Log and Copy Branch Name.
- The changed files. Double-click a file to open its diff. Mark files with Mark as Viewed / Mark as Not Viewed (or the checkbox in the all-commits view).
- Status: check runs (with a Details… list that opens each job on GitHub), merge conflicts (with a Resolve link that checks out the branch and merges the base into it locally), required reviews and reviewer states.
The merge button offers the methods the repository allows: Merge…, Squash and Merge… (both let you edit the commit message) and Rebase.
Review code
Comment in the diff
Pull request diffs compare the merge base with the head. OpenIDEA fetches the pull request ref and base branch first if they are missing locally.- Hover a line and click + in the gutter to comment. Drag to select several lines.
- Choose Start Review (comments stay pending until you submit) or Add Single Comment. OpenIDEA remembers which one you used last.
- Existing threads show inline under their lines. Set which ones under Show Review Threads in the diff settings: All, Unresolved Only (default) or Do Not Show.
- The diff toolbar has Refresh Review Data, Submit Review…, Previous Comment and Next Comment. Past the last change,
F7moves to the next file of the pull request.
Submit a review
Submit Review… opens a small popup. Write an optional summary, then choose Approve, Request Changes or Comment. The trash button discards all pending comments. Authors can’t approve or request changes on their own pull requests.Timeline
View Timeline opens the pull request’s conversation in an editor tab: the description, commits, reviews, review threads and events, newest at the bottom. You can:- Add a comment (
⌘Enter/Ctrl+Enterto send), with@mention completion. - Edit or delete your comments, and add reactions.
- Reply to review threads and Resolve or unresolve them.
- Apply a suggested change with Apply Locally, or apply and commit it in one go with Commit…. Suggestions can only be applied while the pull request’s branch is checked out.
- Delete the head branch from the banner after the pull request is merged.
Review mode
When the checked-out branch is the head of an open pull request, the branch widget shows#N on branch and review mode turns on:
- Review threads appear inline in the regular editor, with the gutter + to add comments and change markers against the pull request base.
- The editor’s corner toolbar has Previous Comment, Next Comment and a Review Mode menu (Disable Review Mode, Show Unresolved Comments Only, Show All Comments).
- The editor context menu adds Show Review Diff.
- If your local branch is behind the remote, the branch widget offers Update to Enable Review Mode….
Create a pull request
Create Pull Request… opens a tab titled “New Pull Request at owner/repo”:- Pick the Base branch and the Head branch (local or remote, and the repository when you have forks).
- Check the commits and changed files.
- Fill in the title and description. The title defaults to the only commit’s subject or the branch name; the description is pre-filled from the repository’s pull request template.
- Optionally set Reviewers:, Assignees: and Labels:.
- Click Create Pull Request, or use the arrow for Create Draft Pull Request.
Check out a pull request
- Checkout Branch (or Checkout Pull Request…) runs
gh pr checkout, which also works for pull requests from forks. - Open in Worktree creates a Git worktree next to the repository (named
<repo>_PR_<n>) on the pull request head and opens it in a new window.
Clone from GitHub
Git › Clone… opens Clone Repository. Choose GitHub in the sidebar to list the repositories you own, collaborate on or can access through an organization, most recently pushed first. Search with Search repositories, then double-click a repository (or pressEnter) to clone it. The URL uses HTTPS, or SSH when gh’s git_protocol for github.com is ssh.
Commit checks in the Git log
The Git log can show the GitHub check status of each commit. Turn on the GitHub Commit Checks column in the log’s View Options › Columns, or in Settings › Version Control › Log. Click a commit’s icon to list its check runs; click a run to open it on GitHub.Not supported
- GitHub Enterprise, GitLab, Bitbucket.
- Issues, gists, notifications and creating or sharing repositories.
- Opening a file or line on GitHub, or copying a permalink.
- Managing GitHub Actions (re-running jobs, reading logs).