Skip to main content

GitHub App

The DriftWise GitHub App connects your GitHub organization to DriftWise for automatic PR commenting. This is separate from the GitHub Actions integration — the App handles the GitHub side (posting comments), while Actions handles the CI side (sending plan data).

What It Does

When installed, the GitHub App:

  • Posts PR comments with plan analysis results (risk score, narrative, callouts)
  • Links repositories to your DriftWise org for automatic routing
  • Identifies PRs by repository owner for comment delivery

Installation

1. Install the GitHub App

Visit the DriftWise GitHub App page and install it on your GitHub organization or user account. Select which repositories to grant access to.

2. Register the installation in DriftWise

After installing on GitHub, register the installation ID with your DriftWise org:

curl -X POST "https://app.driftwise.ai/api/v2/orgs/$ORG_ID/github-installations" \
-H "x-api-key: $DRIFTWISE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"installation_id": 12345678,
"account_login": "your-github-org"
}'
FieldDescription
installation_idThe GitHub App installation ID (from the GitHub callback URL or API)
account_loginThe GitHub account or organization name that installed the app

3. Configure webhooks

Set up a webhook config for your CI provider (Atlantis, GitHub Actions, or GitLab CI). When plan data arrives via webhook, DriftWise uses the GitHub App installation to post comments back to the PR.

Managing Installations

List installations

curl "https://app.driftwise.ai/api/v2/orgs/$ORG_ID/github-installations" \
-H "x-api-key: $DRIFTWISE_API_KEY"

Remove an installation

curl -X DELETE "https://app.driftwise.ai/api/v2/orgs/$ORG_ID/github-installations/<install_id>" \
-H "x-api-key: $DRIFTWISE_API_KEY"

This only removes the DriftWise-side registration. To fully uninstall, also remove the app from your GitHub organization settings.

How It Fits Together

GitHub PR → Atlantis/Actions → Webhook → DriftWise → Analysis → GitHub App → PR Comment
  1. A PR triggers a Terraform plan in your CI
  2. CI sends the plan to DriftWise via webhook
  3. DriftWise analyzes the plan (risk scoring, narrative)
  4. DriftWise uses the GitHub App to post a comment on the PR with results