@flowwright/provider-gitlab
v0.1.1
Published
FlowWright GitLab source-control provider adapter — OAuth install, project discovery, checkout, commit statuses via @gitbeaker.
Readme
@flowwright/provider-gitlab
The GitLab source-control adapter for FlowWright — an OAuth integration (built on
@gitbeaker) that handles installation, project discovery, webhook-driven runs, commit
statuses, and token-based checkout. It implements the same provider-neutral adapter contract
as the GitHub provider, proving the control plane stays vendor-agnostic.
FlowWright · Server · GitHub provider
Use it
import { buildGitLabProvider } from "@flowwright/provider-gitlab";
const provider = buildGitLabProvider({
applicationId: process.env.FW_GITLAB_APP_ID!,
applicationSecret: process.env.FW_GITLAB_APP_SECRET!,
webhookSecret: process.env.FW_GITLAB_WEBHOOK_SECRET!,
});
const repos = await provider.listRepositories(installationId, baseUrl);
const cred = await provider.checkoutCredential(installationId, repositoryId);
await provider.createRunStatus(/* run → commit status */);The control plane resolves and injects the provider through the source-control registry; you rarely construct it directly outside tests.
Public surface
| Area | Main exports |
|---|---|
| Provider | GitLabProvider, buildGitLabProvider, GitLabProviderConfig, GitLabClient |
GitLab installs carry a per-installation OAuth token, threaded through the provider-neutral
InstallationAuth seam (GitHub ignores it, GitLab refreshes and uses it). Webhooks are
verified with the X-Gitlab-Token header.
Design boundary
- Implements the source-control adapter contract against the GitLab API — interchangeable with the GitHub provider in the SCM registry.
- Normalizes GitLab payloads into FlowWright's provider-neutral shapes; the control plane
never imports
@gitbeaker. - Checkout tokens are short-lived and redacted; no secrets are persisted here.
Development
$ pnpm --filter @flowwright/provider-gitlab typecheck
$ pnpm --filter @flowwright/provider-gitlab test
$ pnpm --filter @flowwright/provider-gitlab buildRequires Node.js 24+. Licensed under MIT.
