Run format

This commit is contained in:
Jacob Wallraff
2023-01-23 16:25:30 -08:00
parent 6be2bd1cd7
commit e8c5a21743
4 changed files with 8 additions and 8 deletions
@@ -99,7 +99,6 @@ function getEventContext(workflowContext: WorkflowContext): ExpressionData {
function merge(d: data.Dictionary, toAdd: Object): data.Dictionary {
for (const [key, value] of Object.entries(toAdd)) {
if (value && typeof value === "object" && !d.get(key)) {
if (!Array.isArray(value) && Object.entries(value).length === 0) {
// Allow an empty object to be any value
d.add(key, new data.Null());
+2 -2
View File
@@ -86,8 +86,8 @@ jobs:
expect(result).not.toBeUndefined();
expect(result?.contents).toEqual(
"Runs at 0 and 30 minutes past the hour, at 00:00 and 12:00\n\n" +
"Actions schedules run at most every 5 minutes. " +
"[Learn more](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)"
"Actions schedules run at most every 5 minutes. " +
"[Learn more](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)"
);
});
+5 -4
View File
@@ -36,8 +36,9 @@ function getHover(tokenResult: TokenResult): Hover | null {
if (tokenResult.parent && isCronMapping(tokenResult.parent) && isString(token)) {
let description = getSentence((token as StringToken).value);
if (description) {
description += "\n\nActions schedules run at most every 5 minutes." +
" [Learn more](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)"
description +=
"\n\nActions schedules run at most every 5 minutes." +
" [Learn more](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#onschedule)";
return {
contents: description,
range: mapRange(token.range)
@@ -72,5 +73,5 @@ function getHover(tokenResult: TokenResult): Hover | null {
}
function isCronMapping(token: TemplateToken): boolean {
return token.definition?.key === "cron-mapping"
}
return token.definition?.key === "cron-mapping";
}
@@ -1248,7 +1248,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: echo \${{ github.event.client_payload.anything }}
- run: echo \${{ github.event.client_payload.branch }}`
- run: echo \${{ github.event.client_payload.branch }}`;
const result = await validate(createDocument("wf.yaml", input));