You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
interface IOwnerInfo {
|
|
readonly name: string;
|
|
readonly login: string;
|
|
}
|
|
|
|
interface IRepositoryInfo {
|
|
readonly owner: IOwnerInfo;
|
|
readonly name: string;
|
|
readonly url: string;
|
|
}
|
|
|
|
interface ITargetInfo {
|
|
readonly repo: IRepositoryInfo;
|
|
readonly ref: string;
|
|
readonly sha: string;
|
|
}
|
|
|
|
interface IPullRequestInfo {
|
|
readonly head: ITargetInfo;
|
|
readonly base: ITargetInfo;
|
|
readonly merged: boolean;
|
|
}
|
|
|
|
export interface IHookPushPayload {
|
|
readonly repository: IRepositoryInfo;
|
|
readonly ref: string;
|
|
readonly after: string;
|
|
}
|
|
|
|
export interface IHookPullRequestPayload {
|
|
readonly action: "opened" | "reopened" | "closed" | "synchronize" | "other-unsupported-actions";
|
|
readonly number: number;
|
|
readonly pull_request: IPullRequestInfo;
|
|
}
|
|
|
|
interface IHookPushParameters {
|
|
readonly eventType: "push";
|
|
readonly payload: IHookPushPayload;
|
|
}
|
|
|
|
interface IHookPullRequestParameters {
|
|
readonly eventType: "pull_request";
|
|
readonly payload: IHookPullRequestPayload;
|
|
}
|
|
|
|
interface IHookUnsupportedRequestParameters {
|
|
readonly eventType: "other-unsupported-events";
|
|
}
|
|
|
|
export type HookParameters = IHookPushParameters | IHookPullRequestParameters | IHookUnsupportedRequestParameters;
|
|
|