Add the output value display string

This commit is contained in:
Josh Gross
2022-12-01 15:19:21 -05:00
parent 096e9270f8
commit f276eeaefd
@@ -1,5 +1,5 @@
import {data} from "@github/actions-expressions";
import {isString} from "@github/actions-workflow-parser/.";
import {isScalar, isString} from "@github/actions-workflow-parser";
import {Job} from "@github/actions-workflow-parser/model/workflow-template";
import {WorkflowContext} from "../context/workflow-context";
@@ -40,7 +40,10 @@ function jobOutputs(job?: Job): data.Dictionary {
if (!isString(output.key)) {
continue;
}
d.add(output.key.value, new data.Null());
// Include the value for hover purposes
const value = isScalar(output.value) ? new data.StringData(output.value.toDisplayString()) : new data.Null();
d.add(output.key.value, value);
}
return d;
}