Export default value providers

This commit is contained in:
Christopher Schleiden
2022-11-23 14:36:16 -08:00
parent 1a77979543
commit fd942fc6e2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ async function getValues(
(parent.definition?.key && defaultValueProviders[parent.definition.key]);
if (valueProvider) {
const values = valueProvider();
const values = valueProvider(workflowContext);
return filterAndSortCompletionOptions(values, existingValues);
}
@@ -1,7 +1,7 @@
import {Value, WorkflowContext} from "./config";
import {getJobNames} from "./needs";
const defaultValueProviders: {[key: string]: (workflowContext: WorkflowContext) => Value[]} = {
export const defaultValueProviders: {[key: string]: (workflowContext: WorkflowContext) => Value[]} = {
needs: (workflowContext: WorkflowContext) => getJobNames(workflowContext.template),
"runs-on": () =>
stringsToValues([