gh-action-bump-version/node_modules/actions-toolkit/lib/context.d.ts

70 lines
1.4 KiB
TypeScript
Raw Normal View History

2021-08-07 21:20:18 +00:00
export interface WebhookEvent {
id: string;
name: string;
payload: WebhookPayloadWithRepository;
protocol?: 'http' | 'https';
host?: string;
url?: string;
}
export interface PayloadRepository {
[key: string]: any;
full_name?: string;
name: string;
owner: {
[key: string]: any;
login: string;
name?: string;
};
html_url?: string;
}
export interface WebhookPayloadWithRepository {
[key: string]: any;
repository?: PayloadRepository;
issue?: {
[key: string]: any;
number: number;
html_url?: string;
body?: string;
};
pull_request?: {
[key: string]: any;
number: number;
html_url?: string;
body?: string;
};
sender?: {
[key: string]: any;
type: string;
};
action?: string;
installation?: {
id: number;
[key: string]: any;
};
}
export declare class Context {
/**
* Webhook payload object that triggered the workflow
*/
payload: WebhookPayloadWithRepository;
/**
* Name of the event that triggered the workflow
*/
event: string;
sha: string;
ref: string;
workflow: string;
action: string;
actor: string;
constructor();
readonly issue: {
number: any;
owner: string;
repo: string;
};
readonly repo: {
owner: string;
repo: string;
};
}