Source Control

Visual regression testing built into your GitHub workflow

OAuth login, repo sync, webhook-triggered builds on every PR, automated PR comments with visual diffs, and one-click GitHub issues when a regression slips through. Works with public, private, and GitHub Enterprise repos.

Try Lastest free →Read the docs

What you get

Three things this integration does - and what they mean for your team.

01

OAuth + repo sync

Sign in with GitHub, authorize the Lastest OAuth App, and pick which repositories to import. Tokens are stored encrypted; revoke at any time from GitHub Settings → Applications.

02

PR-triggered builds with comments

A GitHub webhook on opened, synchronize, and push events queues a Lastest build for the PR head commit. Results - passed, failed, review-required, safe-to-merge, blocked - are posted back as a single sticky PR comment.

03

Auto-issues from visual diffs

When a meaningful diff is detected, the “Open as GitHub issue” action attaches the baseline, screenshot, side-by-side, build URL, and reproducer link to a freshly-filed issue and links it back to the PR.

How it works

Data flow, configuration, and result routing - visualised.

Diagram 1 · OAuth & repo sync

How Lastest authenticates with GitHub

USER · BROWSERGITHUBLASTESTYougithub userOAuth Authorize/login/oauthGitHub API/repos /webhooksOAuth callback/api/auth/callback/githubEncrypted token storeDB · per-user1 authorize2 code3 store4 list repos
You authorize the Lastest GitHub App once. Lastest exchanges the OAuth code for an installation token, calls the GitHub API to list and import repos, and stores only encrypted tokens - never your source code.

Diagram 2 · PR-triggered build flow

What happens when you open a pull request

git push / open PRGitHubwebhookLastest server/api/webhooks/githubBuild queuerunner_commandsEmbedded BrowserPlaywright podVisual diff3 enginesPR commentsticky · updatedsigned eventqueuepick upscreenshotsresultcomment
GitHub fires a webhook to Lastest on PR open / synchronize / push. Lastest queues a build, dispatches it to a remote runner, captures screenshots in the Embedded Browser, diffs them against the baseline, and posts the verdict back to the PR.

Diagram 3 · Auto-open GitHub issue on regression

From visual diff to triaged issue in one click

Visual diff cardmeaningful changeOpen as issueGitHub issuetitle · body · labelsAttachmentsbaseline · current · diffPR backlinkcloses #142POST /issuesupload
When a build surfaces a real regression, the operator hits “Open as GitHub issue.” Lastest creates an issue with the baseline, current screenshot, side-by-side diff, build URL, git SHA, and reproducer command - and links it back to the originating PR.

Configure

Drop-in config for GitHub

Add to your Lastest .env to enable the GitHub OAuth + webhook flow

GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_REDIRECT_URI=https://your-lastest/api/auth/callback/github
GITHUB_WEBHOOK_SECRET=$(openssl rand -hex 32)

Frequently asked questions about Lastest + GitHub

Does Lastest support GitHub Enterprise Server?
Yes. Set GITHUB_INSTANCE_URL to your Enterprise host and use an OAuth App registered on that host. Webhooks, PR comments, and the Lastest GitHub Action all work against on-prem GitHub.
Where is my GitHub token stored?
Encrypted at rest in your Lastest database. Lastest never reads your source - only metadata (PR titles, commit SHAs, branches) and the diff URLs needed to post comments.
Will the bot comment on every push?
No. Lastest uses a single sticky comment per PR and updates it in place on every new commit. The comment shows the latest build result, link, and counts of passed / failed / review-required tests.
Can I gate merges on visual regression tests?
Yes - set fail-on-changes: true in the GitHub Action and add the Lastest check to GitHub branch protection. PRs that introduce unapproved visual changes cannot merge.
How do I revoke access?
GitHub → Settings → Applications → Authorized OAuth Apps → revoke Lastest. Lastest will lose access immediately and queued webhooks will stop firing.