Menu

GitHub Integration

Viktor Fási

GitHub Integration

Lastest integrates deeply with GitHub for authentication, repository sync, and CI/CD.


Features

  • OAuth login -- sign in with your GitHub account
  • Repository sync -- import repos from GitHub
  • PR comments -- automatic build results posted to pull requests
  • Webhook-triggered builds -- builds run when PRs are opened or updated
  • GitHub Action -- reusable composite action for CI/CD
  • Smart Run -- git diff analysis to run only affected tests

Setup

1. Create a GitHub OAuth App

  1. Go to GitHub > Settings > Developer Settings > OAuth Apps
  2. Create a new OAuth App
  3. Set the callback URL to http://your-lastest-url/api/auth/callback/github
  4. Note the Client ID and Client Secret

2. Configure Environment Variables

GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_REDIRECT_URI=http://your-url/api/auth/callback/github  # Optional
GITHUB_WEBHOOK_SECRET=your-webhook-secret  # Optional: verify webhook signatures

3. Connect in Lastest

  1. Go to Settings > GitHub
  2. Click "Connect GitHub"
  3. Authorize the application
  4. Select repositories to sync

Webhook-Triggered Builds

When webhooks are configured:

  • PR opened -- triggers a build for the PR branch
  • PR updated (new commits pushed) -- triggers a new build
  • Push to monitored branch -- triggers a build

Build results are automatically posted as PR comments.


Auto-Create Issues from Visual Diffs

When a build surfaces a meaningful visual diff, Lastest can open a GitHub issue for it automatically:

  • Notification setting (Settings > Notifications) -- enable "Create GitHub issue from visual diff" globally
  • Per-diff one-click -- on any diff card, the "Open as GitHub issue" action attaches the screenshot, baseline, side-by-side diff, build URL, and reproducer link to a freshly-filed issue in the linked repo

Cached GitHub issues power both the analytics view and the bug-report linker -- so when an in-app Bug Reports is filed, Lastest can suggest "this looks like issue [#142] you already opened".


GitHub Action

See [CI CD Integration] for the full GitHub Action setup guide.


Related

Wiki: Bug Reports
Wiki: CI CD Integration
Wiki: Custom Webhooks
Wiki: Home
Wiki: Settings Reference
Wiki: _Sidebar

MongoDB Logo MongoDB