Files
languageservices/actions-languageservice/src/value-providers/config.ts
T
Laura Yu 330f62ebe7 Add needs value provider (#2)
* Add needs value provider
2022-11-23 10:54:15 -08:00

24 lines
610 B
TypeScript

import {WorkflowTemplate} from "@github/actions-workflow-parser/.";
export interface Value {
label: string;
description?: string;
}
export type ValueProvider = () => Value[];
export interface WorkflowContext {
uri: string;
template: WorkflowTemplate | undefined;
}
export interface ValueProviderConfig {
getCustomValues: (key: string, context: WorkflowContext) => Promise<Value[] | undefined>;
getActionInputs?: (owner: string, name: string, ref: string, path?: string) => Promise<ActionInput[]>;
}
export interface ActionInput {
name: string;
description?: string;
required?: boolean;
}