UNPKG

repository-provider

Version:

abstract interface to git repository providers like github, bitbucket and gitlab

37 lines (31 loc) 819 B
import { OwnedObject } from "./owned-object.mjs"; import { secret_attribute, boolean_attribute, active_attribute, url_attribute, default_attribute } from "./attributes.mjs"; /** * Repository hook. */ export class Hook extends OwnedObject { static defaultEvents = new Set(["*"]); static get attributes() { return { ...super.attributes, active: active_attribute, secret: secret_attribute, url: { ...url_attribute, description: "target url", writable: true }, content_type: { ...default_attribute, default: "json", writable: true }, insecure_ssl: boolean_attribute, events: { type: "set", default: this.defaultEvents } }; } static get addMethodName() { return "_addHook"; } static get delteteMethodName() { return "_deleteHook"; } }