Skip to main content

What it does

The GitWhy GitHub App (gitwhy-bot) posts structured context comments on pull requests matching the commits in your saved contexts. Reviewers see the reasoning behind AI-generated code directly on the PR — no extra steps.
gitwhy-bot PR comment showing context, story, and metadata
gitwhy-bot posts the full context — title, metadata, story, and reasoning — directly on the pull request.

Install the GitHub App

1

Visit the GitHub App page

Go to github.com/apps/gitwhy-bot and click Install.
2

Select repositories

Choose All repositories or select specific repos where you want context posted to PRs.
3

Authorize

GitWhy only needs read/write access to pull request comments. No code access is required.
GitHub App installation showing permissions and repository access
Select All repositories or pick specific repos — gitwhy-bot only needs pull request read/write access. Once installed, see Post context to a PR for usage.

How updates work

When new commits are pushed to the PR branch, gitwhy-bot edits its existing comment with updated context. No duplicate comments are created.

Permissions & access

GitWhy does not request code access. The app only reads PR metadata and writes comments.
The number of connected repositories depends on your plan. See Plans & Pricing for details.

Troubleshooting

  • Verify the GitHub App is installed on the repository: check Settings → Integrations → GitHub Apps on GitHub.
  • Make sure you’ve synced the context to cloud first (git why push or gitwhy_sync()).
  • Check that the saved context’s commits match commits in an open PR.
Very large contexts are truncated to fit GitHub’s comment size limit. The comment includes a link to the full context on the dashboard.
The bot matches by commit SHA. If the same commits appear in multiple PRs, the bot posts on all matching PRs.
Re-installing the app creates a new installation. GitWhy detects this automatically — no action needed on your part.

See also