npm.io
0.0.7 • Published 5 years ago

bitbucket-webhooks

Licence
MIT
Version
0.0.7
Deps
0
Size
78 kB
Vulns
0
Weekly
0

bitbucket-webhooks

Type definitions for Bitbucket webhook events

CI Status

Usage

Since Bitbucket Server and Bitbucket Cloud have different webook formats, you need to import the type definitions from the appropriate place; either:

import { server } from 'bitbucket-webhooks';
let pr: server.PullRequest;
// or
import { PullRequest } from 'bitbucket-webhooks/server';
let pr: PullRequest;

Note that there are no definitions for the Bitbucket Cloud webhooks yet

There are also builder functions for the various types:

import { PullRequest } from 'bitbucket-webhooks/server';
import { pullRequest } from 'bitbucket-webhooks/builders/server';

const pr: PullRequest = pullRequest({
  description: 'A super-cool pull request',
});

Bitbucket is a trademark of Atlassian, with which this library is not associated.

Keywords