mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
add events and expose them for webhooks (#2493)
This commit is contained in:
parent
9f4b34367c
commit
8af64e9370
@ -15,6 +15,15 @@ import {
|
||||
FEATURE_UPDATED,
|
||||
FEATURE_TAGGED,
|
||||
FEATURE_UNTAGGED,
|
||||
CHANGE_REQUEST_CREATED,
|
||||
CHANGE_REQUEST_DISCARDED,
|
||||
CHANGE_ADDED,
|
||||
CHANGE_DISCARDED,
|
||||
CHANGE_REQUEST_APPROVED,
|
||||
CHANGE_REQUEST_APPROVAL_ADDED,
|
||||
CHANGE_REQUEST_CANCELLED,
|
||||
CHANGE_REQUEST_SENT_TO_REVIEW,
|
||||
CHANGE_REQUEST_APPLIED,
|
||||
} from '../types/events';
|
||||
import { IAddonDefinition } from '../types/model';
|
||||
|
||||
@ -87,6 +96,15 @@ const webhookDefinition: IAddonDefinition = {
|
||||
FEATURE_PROJECT_CHANGE,
|
||||
FEATURE_TAGGED,
|
||||
FEATURE_UNTAGGED,
|
||||
CHANGE_REQUEST_CREATED,
|
||||
CHANGE_REQUEST_DISCARDED,
|
||||
CHANGE_ADDED,
|
||||
CHANGE_DISCARDED,
|
||||
CHANGE_REQUEST_APPROVED,
|
||||
CHANGE_REQUEST_APPROVAL_ADDED,
|
||||
CHANGE_REQUEST_CANCELLED,
|
||||
CHANGE_REQUEST_SENT_TO_REVIEW,
|
||||
CHANGE_REQUEST_APPLIED,
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ class FeatureToggleService {
|
||||
environment,
|
||||
));
|
||||
if (canAddStrategies) {
|
||||
await this.createStrategy(
|
||||
await this.unprotectedCreateStrategy(
|
||||
getDefaultStrategy(featureName),
|
||||
{
|
||||
environment,
|
||||
|
@ -84,6 +84,16 @@ export const PUBLIC_SIGNUP_TOKEN_CREATED = 'public-signup-token-created';
|
||||
export const PUBLIC_SIGNUP_TOKEN_USER_ADDED = 'public-signup-token-user-added';
|
||||
export const PUBLIC_SIGNUP_TOKEN_TOKEN_UPDATED = 'public-signup-token-updated';
|
||||
|
||||
export const CHANGE_REQUEST_CREATED = 'change-request-created';
|
||||
export const CHANGE_REQUEST_DISCARDED = 'change-request-discarded';
|
||||
export const CHANGE_ADDED = 'change-added';
|
||||
export const CHANGE_DISCARDED = 'change-discarded';
|
||||
export const CHANGE_REQUEST_APPROVED = 'change-request-approved';
|
||||
export const CHANGE_REQUEST_APPROVAL_ADDED = 'change-request-approval-added';
|
||||
export const CHANGE_REQUEST_CANCELLED = 'change-request-cancelled';
|
||||
export const CHANGE_REQUEST_SENT_TO_REVIEW = 'change-request-sent-to-review';
|
||||
export const CHANGE_REQUEST_APPLIED = 'change-request-applied';
|
||||
|
||||
export interface IBaseEvent {
|
||||
type: string;
|
||||
createdBy: string;
|
||||
|
Loading…
Reference in New Issue
Block a user