# gitlab-event-types

> gitlab webhook event types

Latest version **3.0.1** (published 2025-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install gitlab-event-types
pnpm add gitlab-event-types
yarn add gitlab-event-types
bun add gitlab-event-types
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2025-08-21 |
| First published | 2022-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 71.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 4 |
| Author | lawvs |
| Maintainers | lawvs |
| Keywords | gitlab, webhook, typescript, types |

## Links

- npm: https://www.npmjs.com/package/gitlab-event-types
- Repository: https://github.com/lawvs/gitlab-event-types
- Homepage: https://github.com/lawvs/gitlab-event-types#readme
- Issues: https://github.com/lawvs/gitlab-event-types/issues
- npm.io page: https://npm.io/package/gitlab-event-types

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2025-08-21
- 3.0.0 — 2025-08-21
- 2.1.1 — 2025-03-05
- 2.1.0 — 2024-04-10
- 2.0.1 — 2023-09-27
- 2.0.0 — 2023-09-24
- 1.0.3 — 2022-03-27
- 1.0.1 — 2022-03-27

## README

# GitLab Event Types

[![Build](https://github.com/lawvs/gitlab-event-types/actions/workflows/build.yml/badge.svg)](https://github.com/lawvs/gitlab-event-types/actions/workflows/build.yml)
[![npm](https://img.shields.io/npm/v/gitlab-event-types)](https://www.npmjs.com/package/gitlab-event-types)

TypeScript definitions for [GitLab Webhook Event](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html).

## Install

```sh
# Use npm
npm install -D gitlab-event-types

# Use yarn
yarn add -D gitlab-event-types

# Use pnpm
pnpm add -D gitlab-event-types
```

## Usages

```ts
import type { WebhookEvents, PushEvent } from "gitlab-event-types";

const isPushEvent = (event: WebhookEvents): event is PushEvent =>
  "object_kind" in event && event.object_kind === "push";

const hookHandler = async (event: WebhookEvents) => {
  if (isPushEvent(event)) {
    console.log(event.commits);
  }
};
```

Or

```ts
import type * as GitlabEventTypes from "gitlab-event-types";

const pushEventHandler = async (event: GitlabEventTypes.PushEvent) => {
  console.log(event.object_kind);
};
```

## Definitions

```ts
export type WebhookEvents =
  | PushEvent
  | TagPushEvent
  | IssueEvent
  | CommentEvent
  | MergeRequestEvent
  | WikiPageEvent
  | PipelineEvent
  | JobEvent
  | DeploymentEvent
  | GroupMemberEvent
  | ProjectEvent
  | SubgroupEvent
  | FeatureFlagEvent
  | ReleaseEvent
  | MilestoneEvent
  | EmojiEvent
  | AccessTokenEvent
  | VulnerabilityEvent;
```

## Credits

Thanks to [excaliburhan/node-gitlab-webhook](https://github.com/excaliburhan/node-gitlab-webhook)(MIT License).

## License

MIT

---
_Source: https://npm.io/package/gitlab-event-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
