From bb9c7f16ba3c2d76180f5951ad0048f832f7bef1 Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Fri, 6 Jan 2023 13:32:53 -0800 Subject: [PATCH 1/2] Add hover property tests --- actions-languageservice/src/hover.test.ts | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/actions-languageservice/src/hover.test.ts b/actions-languageservice/src/hover.test.ts index 2b00671..598ed0b 100644 --- a/actions-languageservice/src/hover.test.ts +++ b/actions-languageservice/src/hover.test.ts @@ -25,6 +25,32 @@ jobs: expect(result?.contents).toEqual("Runs your workflow when you push a commit or tag."); }); + + it("on a parameter with a description", async () => { + const input = `on: push +jobs: + build: + co|ntinue-on-error: false`; + const result = await hover(...getPositionFromCursor(input)); + expect(result).not.toBeUndefined(); + expect(result?.contents).toEqual( + "Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails.\n\n" + + "**Context:** github, inputs, vars, needs, strategy, matrix" + ); + }); + + it("on a parameter with its own type", async () => { + const input = `on: push +jobs: + build: + pe|rmissions: read-all`; + const result = await hover(...getPositionFromCursor(input)); + expect(result).not.toBeUndefined(); + expect(result?.contents).toEqual( + "You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access." + ); + }); + it("on a value in a sequence", async () => { const input = `on: [pull_request, pu|sh] From 40debd9c0b527ac9670aabbf4de58b9c78ec5fef Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Fri, 6 Jan 2023 14:11:51 -0800 Subject: [PATCH 2/2] Update package version --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6dc6a96..eac4640 100644 --- a/package-lock.json +++ b/package-lock.json @@ -702,9 +702,9 @@ "link": true }, "node_modules/@github/actions-workflow-parser": { - "version": "0.0.39", - "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.39/ba3e9e02e489175e0f284f0aebd9bde92ad4e935", - "integrity": "sha512-Iw8OkCUxdgFvXpJkg6dAIEpGQrS09o3TC1I0looCJ1lHMBDBD7aVXasE8zJzlQUTdgRTGMiptNMgZS2MnGC76Q==", + "version": "0.0.41", + "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.41/234e6042ee06199b4314589ad77dfd7fe0debe6d", + "integrity": "sha512-s27gUhNH80YhFmkcQ5GE5BA5D15xbQ48YjwKCwYKN+ndldaOhpqa+v5Q+NfZlNwBmJ/8lJZob09/IiGRgFq7ag==", "license": "MIT", "dependencies": { "@github/actions-expressions": "*", @@ -13565,9 +13565,9 @@ } }, "@github/actions-workflow-parser": { - "version": "0.0.39", - "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.39/ba3e9e02e489175e0f284f0aebd9bde92ad4e935", - "integrity": "sha512-Iw8OkCUxdgFvXpJkg6dAIEpGQrS09o3TC1I0looCJ1lHMBDBD7aVXasE8zJzlQUTdgRTGMiptNMgZS2MnGC76Q==", + "version": "0.0.41", + "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.41/234e6042ee06199b4314589ad77dfd7fe0debe6d", + "integrity": "sha512-s27gUhNH80YhFmkcQ5GE5BA5D15xbQ48YjwKCwYKN+ndldaOhpqa+v5Q+NfZlNwBmJ/8lJZob09/IiGRgFq7ag==", "requires": { "@github/actions-expressions": "*", "yaml": "^2.0.0-8"