From 1b823ebe675a6b701e54c79b2ac6dc7ea700fbb2 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 16:24:16 +0800 Subject: [PATCH 01/10] Drop version constraints "ghes > 3.3 or ghae > 3.3" - ghes 3.3 is deprecated in github/docs@ac2cd0e47de1c4c4ea654c9fd36b7a9ff9ea5a50 - ghae 3.3 is deprecated in github/docs@fefcf3b5a60aea2443b6392dcd56e367f55a1ceb --- .../src/context-providers/descriptions.json | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index e0ce214..581c357 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -99,32 +99,16 @@ "description": "The [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job.
Note: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`." }, "ref": { - "description": "The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by `push`, this is the branch or tag ref that was pushed. For workflows triggered by `pull_request`, this is the pull request merge branch. For workflows triggered by `release`, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is `refs/heads/`, for pull requests it is `refs/pull//merge`, and for tags it is `refs/tags/`. For example, `refs/heads/feature-branch-1`.", - "versions": { - "ghes": "3.3", - "ghae": "3.3" - } + "description": "The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by `push`, this is the branch or tag ref that was pushed. For workflows triggered by `pull_request`, this is the pull request merge branch. For workflows triggered by `release`, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is `refs/heads/`, for pull requests it is `refs/pull//merge`, and for tags it is `refs/tags/`. For example, `refs/heads/feature-branch-1`." }, "ref_name": { - "description": "The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, `feature-branch-1`.", - "versions": { - "ghes": "3.3", - "ghae": "3.3" - } + "description": "The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, `feature-branch-1`." }, "ref_protected": { - "description": "`true` if branch protections are configured for the ref that triggered the workflow run.", - "versions": { - "ghes": "3.3", - "ghae": "3.3" - } + "description": "`true` if branch protections are configured for the ref that triggered the workflow run." }, "ref_type": { - "description": "The type of ref that triggered the workflow run. Valid values are `branch` or `tag`.", - "versions": { - "ghes": "3.3", - "ghae": "3.3" - } + "description": "The type of ref that triggered the workflow run. Valid values are `branch` or `tag`." }, "path": { "description": "Path on the runner to the file that sets system `PATH` variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands](https://docs.github.com/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path)." @@ -155,11 +139,7 @@ } }, "secret_source": { - "description": "The source of a secret used in a workflow. Possible values are `None`, `Actions`, `Dependabot`, or `Codespaces`.", - "versions": { - "ghes": "3.3", - "ghae": "3.3" - } + "description": "The source of a secret used in a workflow. Possible values are `None`, `Actions`, `Dependabot`, or `Codespaces`." }, "server_url": { "description": "The URL of the GitHub server. For example: `https://github.com`." From b67105b9b40605635e1b17e658aff7d340bbabd9 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 16:35:47 +0800 Subject: [PATCH 02/10] Update descriptions for `github` context --- .../src/context-providers/descriptions.json | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index 581c357..8a6d282 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -54,10 +54,10 @@ }, "github": { "action": { - "description": "The name of the action currently running, or the [`id`](https://docs.github.com/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid) of a step. GitHub Actions removes special characters, and uses the name `__run` when the current step runs a script without an `id`. If you use the same action more than once in the same job, the name will include a suffix with the sequence number with underscore before it. For example, the first script you run will have the name `__run`, and the second script will be named `__run_2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`." + "description": "The name of the action currently running, or the [`id`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsid) of a step. GitHub removes special characters, and uses the name `__run` when the current step runs a script without an `id`. If you use the same action more than once in the same job, the name will include a suffix with the sequence number with underscore before it. For example, the first script you run will have the name `__run`, and the second script will be named `__run_2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`." }, "action_path": { - "description": "The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action." + "description": "The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action, for example by changing directories to the path: `cd ${{ github.action_path }}`." }, "action_ref": { "description": "For a step executing an action, this is the ref of the action being executed. For example, `v2`." @@ -71,17 +71,24 @@ "actor": { "description": "The username of the user that triggered the initial workflow run. If the workflow run is a re-run, this value may differ from `github.triggering_actor`. Any workflow re-runs will use the privileges of `github.actor`, even if the actor initiating the re-run (`github.triggering_actor`) has different privileges." }, + "actor_id": { + "description": "The account ID of the person or app that triggered the initial workflow run. For example, `1234567`. Note that this is different from the actor username.", + "versions": { + "ghes": "3.9", + "ghae": "3.9" + } + }, "api_url": { - "description": "The URL of the GitHub Actions REST API." + "description": "The URL of the GitHub REST API." }, "base_ref": { "description": "The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`." }, "env": { - "description": "Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands](https://docs.github.com/actions/learn-github-actions/workflow-commands-for-github-actions#setting-an-environment-variable)." + "description": "Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable)." }, "event": { - "description": "The full event webhook payload. You can access individual properties of the event using this context. This object is identical to the webhook payload of the event that triggered the workflow run, and is different for each event. The webhooks for each GitHub Actions event is linked in [Event that trigger workflows](/articles/events-that-trigger-workflows/). For example, for a workflow run triggered by the [`push` event](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push), this object contains the contents of the [push webhook payload](https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push)." + "description": "The full event webhook payload. You can access individual properties of the event using this context. This object is identical to the webhook payload of the event that triggered the workflow run, and is different for each event. The webhooks for each GitHub Actions event is linked in [Events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows). For example, for a workflow run triggered by the [`push` event](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push), this object contains the contents of the [push webhook payload](https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#push)." }, "event_name": { "description": "The name of the event that triggered the workflow run." @@ -90,13 +97,19 @@ "description": "The path to the file on the runner that contains the full event webhook payload." }, "graphql_url": { - "description": "The URL of the GitHub Actions GraphQL API." + "description": "The URL of the GitHub GraphQL API." }, "head_ref": { "description": "The `head_ref` or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`." }, "job": { - "description": "The [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job.
Note: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`." + "description": "The [`job_id`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_id) of the current job.\nNote: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`." + }, + "job_workflow_sha": { + "description": "For jobs using a reusable workflow, the commit SHA for the reusable workflow file." + }, + "path": { + "description": "Path on the runner to the file that sets system PATH variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path)." }, "ref": { "description": "The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by `push`, this is the branch or tag ref that was pushed. For workflows triggered by `pull_request`, this is the pull request merge branch. For workflows triggered by `release`, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is `refs/heads/`, for pull requests it is `refs/pull//merge`, and for tags it is `refs/tags/`. For example, `refs/heads/feature-branch-1`." @@ -110,17 +123,17 @@ "ref_type": { "description": "The type of ref that triggered the workflow run. Valid values are `branch` or `tag`." }, - "path": { - "description": "Path on the runner to the file that sets system `PATH` variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands](https://docs.github.com/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path)." - }, "repository": { - "description": "The owner and repository name. For example, `Codertocat/Hello-World`." + "description": "The owner and repository name. For example, `octocat/Hello-World`." + }, + "repository_id": { + "description": "The ID of the repository. For example, `123456789`. Note that this is different from the repository name." }, "repository_owner": { - "description": "The repository owner's name. For example, `Codertocat`." + "description": "The repository owner's username. For example, `octocat`." }, "repositoryUrl": { - "description": "The Git URL to the repository. For example, `git://github.com/codertocat/hello-world.git`." + "description": "The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`." }, "retention_days": { "description": "The number of days that workflow run logs and artifacts are kept." @@ -156,6 +169,12 @@ "workflow": { "description": "The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository." }, + "workflow_ref": { + "description": "The ref path to the workflow. For example, `octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch`." + }, + "workflow_sha": { + "description": "The commit SHA for the workflow file." + }, "workspace": { "description": "The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action." } From 7e062aa16bb2f285d7a7723eb0f73d1045150784 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 16:49:29 +0800 Subject: [PATCH 03/10] `hashFiles()` function --- languageservice/src/context-providers/descriptions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index 8a6d282..f66347d 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -49,7 +49,7 @@ "description": "Returns `true` when any previous step of a job fails. If you have a chain of dependent jobs, `failure()` returns `true` if any ancestor job fails." }, "hashFiles": { - "description": "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`." + "description": "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see [SHA-2.](https://wikipedia.org/wiki/SHA-2)\n\nYou can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see [Workflow syntax for GitHub Actions.](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)" } }, "github": { From 84335c720323eee4767e38a6e3ec261d436fb18d Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 16:54:20 +0800 Subject: [PATCH 04/10] fixup! Update descriptions for `github` context --- languageservice/src/context-providers/descriptions.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index f66347d..2df16ab 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -132,6 +132,9 @@ "repository_owner": { "description": "The repository owner's username. For example, `octocat`." }, + "repository_owner_id": { + "description": "The repository owner's account ID. For example, `1234567`. Note that this is different from the owner's name." + }, "repositoryUrl": { "description": "The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`." }, From def4fb41a98e866b2c5130ce09647828474f29f0 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 16:55:05 +0800 Subject: [PATCH 05/10] Add version constraints see - https://github.com/github/docs/blame/main/content/actions/learn-github-actions/contexts.md - https://github.com/github/docs/blob/main/data/features/actions-oidc-custom-claims.yml --- .../src/context-providers/descriptions.json | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index 2df16ab..4b20b2c 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -74,8 +74,8 @@ "actor_id": { "description": "The account ID of the person or app that triggered the initial workflow run. For example, `1234567`. Note that this is different from the actor username.", "versions": { - "ghes": "3.9", - "ghae": "3.9" + "ghes": ">=3.9", + "ghae": ">=3.9" } }, "api_url": { @@ -106,7 +106,11 @@ "description": "The [`job_id`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_id) of the current job.\nNote: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`." }, "job_workflow_sha": { - "description": "For jobs using a reusable workflow, the commit SHA for the reusable workflow file." + "description": "For jobs using a reusable workflow, the commit SHA for the reusable workflow file.", + "versions": { + "ghes": ">=3.9", + "ghae": ">=3.9" + } }, "path": { "description": "Path on the runner to the file that sets system PATH variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path)." @@ -127,13 +131,21 @@ "description": "The owner and repository name. For example, `octocat/Hello-World`." }, "repository_id": { - "description": "The ID of the repository. For example, `123456789`. Note that this is different from the repository name." + "description": "The ID of the repository. For example, `123456789`. Note that this is different from the repository name.", + "versions": { + "ghes": ">=3.9", + "ghae": ">=3.9" + } }, "repository_owner": { "description": "The repository owner's username. For example, `octocat`." }, "repository_owner_id": { - "description": "The repository owner's account ID. For example, `1234567`. Note that this is different from the owner's name." + "description": "The repository owner's account ID. For example, `1234567`. Note that this is different from the owner's name.", + "versions": { + "ghes": ">=3.9", + "ghae": ">=3.9" + } }, "repositoryUrl": { "description": "The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`." @@ -173,10 +185,18 @@ "description": "The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository." }, "workflow_ref": { - "description": "The ref path to the workflow. For example, `octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch`." + "description": "The ref path to the workflow. For example, `octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch`.", + "versions": { + "ghes": ">=3.9", + "ghae": ">=3.9" + } }, "workflow_sha": { - "description": "The commit SHA for the workflow file." + "description": "The commit SHA for the workflow file.", + "versions": { + "ghes": ">=3.9", + "ghae": ">=3.9" + } }, "workspace": { "description": "The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action." From b0c2dec02fc9dccaf0b83ebd7d30e4c1f24b7f3b Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 17:08:09 +0800 Subject: [PATCH 06/10] other contexts --- .../src/context-providers/descriptions.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index 4b20b2c..b1299df 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -204,7 +204,7 @@ }, "secrets": { "GITHUB_TOKEN": { - "description": "`GITHUB_TOKEN` is a secret that is automatically created for every workflow run, and is always included in the secrets context. For more information, see [Automatic token authentication](https://docs.github.com/actions/security-guides/automatic-token-authentication)." + "description": "Automatically created token for each workflow run. For more information, see [Automatic token authentication.](https://docs.github.com/actions/security-guides/automatic-token-authentication)" } }, "jobs": { @@ -217,13 +217,13 @@ }, "steps": { "outputs": { - "description": "The set of outputs defined for the step." + "description": "The set of outputs defined for the step. For more information, see [Metadata syntax for GitHub Actions.](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions)" }, "conclusion": { - "description": "The result of a completed step after `continue-on-error` is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." + "description": "The result of a completed step after [`continue-on-error`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." }, "outcome": { - "description": "The result of a completed step before `continue-on-error` is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." + "description": "The result of a completed step before [`continue-on-error`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." } }, "runner": { @@ -240,24 +240,24 @@ "description": "The path to a temporary directory on the runner. This directory is emptied at the beginning and end of each job. Note that files will not be removed if the runner's user account does not have permission to delete them." }, "tool_cache": { - "description": "The path to the directory containing preinstalled tools for GitHub-hosted runners. For more information, see \"[About GitHub-hosted runners](https://docs.github.com/actions/reference/specifications-for-github-hosted-runners/#supported-software)\"." + "description": "The path to the directory containing preinstalled tools for GitHub-hosted runners. For more information, see \"[About GitHub-hosted runners](https://docs.github.com/actions/reference/specifications-for-github-hosted-runners/#supported-software).\"" }, "debug": { - "description": "This is set only if [debug logging](https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging) is enabled, and always has the value of 1. It can be useful as an indicator to enable additional debugging or verbose logging in your own job steps." + "description": "This is set only if [debug logging](https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging) is enabled, and always has the value of `1`. It can be useful as an indicator to enable additional debugging or verbose logging in your own job steps." } }, "strategy": { "fail-fast": { - "description": "The `fail-fast` setting for the job. Possible values are `true` or `false`. For more information, see [Workflow syntax for GitHub Actions: `jobs..strategy.fail-fast`](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast)." - }, - "max-parallel": { - "description": "The `max-parallel` setting for the job. For more information, see [Workflow syntax for GitHub Actions: `jobs..strategy.max-parallel`](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel)." + "description": "When `true`, all in-progress jobs are canceled if any job in a matrix fails. For more information, see [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast)." }, "job-index": { "description": "The index of the current job in the matrix. **Note:** This number is a zero-based number. The first job's index in the matrix is `0`." }, "job-total": { "description": "The total number of jobs in the matrix. **Note:** This number **is not** a zero-based number. For example, for a matrix with four jobs, the value of `job-total` is `4`." + }, + "max-parallel": { + "description": "The maximum number of jobs that can run simultaneously when using a matrix job strategy. For more information, see [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel)." } } } \ No newline at end of file From 098e785c13a4143eaf58e41144a922da73c6ded7 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 17:17:05 +0800 Subject: [PATCH 07/10] Drop version constraints "ghes > 3.5 or ghae > 3.4" See github/docs@19ded728c0fc06dc2a4d939ac7026fc050671ebc --- languageservice/src/context-providers/descriptions.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index b1299df..1d1d9a8 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -160,11 +160,7 @@ "description": "A unique number for each run of a particular workflow in a repository. This number begins at 1 for the workflow's first run, and increments with each new run. This number does not change if you re-run the workflow run." }, "run_attempt": { - "description": "A unique number for each attempt of a particular workflow run in a repository. This number begins at 1 for the workflow run's first attempt, and increments with each re-run.", - "versions": { - "ghes": "3.5", - "ghae": "3.4" - } + "description": "A unique number for each attempt of a particular workflow run in a repository. This number begins at 1 for the workflow run's first attempt, and increments with each re-run." }, "secret_source": { "description": "The source of a secret used in a workflow. Possible values are `None`, `Actions`, `Dependabot`, or `Codespaces`." From 026f4e3ece5dcbee9bbdb12234bf8ec40f9f98d2 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 17:23:12 +0800 Subject: [PATCH 08/10] quote references --- .../src/context-providers/descriptions.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/languageservice/src/context-providers/descriptions.json b/languageservice/src/context-providers/descriptions.json index 1d1d9a8..7e6fb31 100644 --- a/languageservice/src/context-providers/descriptions.json +++ b/languageservice/src/context-providers/descriptions.json @@ -49,7 +49,7 @@ "description": "Returns `true` when any previous step of a job fails. If you have a chain of dependent jobs, `failure()` returns `true` if any ancestor job fails." }, "hashFiles": { - "description": "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see [SHA-2.](https://wikipedia.org/wiki/SHA-2)\n\nYou can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see [Workflow syntax for GitHub Actions.](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)" + "description": "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see \"[SHA-2](https://wikipedia.org/wiki/SHA-2).\"\n\nYou can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see \"[Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).\"" } }, "github": { @@ -85,10 +85,10 @@ "description": "The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`." }, "env": { - "description": "Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable)." + "description": "Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see \"[Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable).\"" }, "event": { - "description": "The full event webhook payload. You can access individual properties of the event using this context. This object is identical to the webhook payload of the event that triggered the workflow run, and is different for each event. The webhooks for each GitHub Actions event is linked in [Events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows). For example, for a workflow run triggered by the [`push` event](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push), this object contains the contents of the [push webhook payload](https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#push)." + "description": "The full event webhook payload. You can access individual properties of the event using this context. This object is identical to the webhook payload of the event that triggered the workflow run, and is different for each event. The webhooks for each GitHub Actions event is linked in \"[Events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\" For example, for a workflow run triggered by the [`push` event](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push), this object contains the contents of the [push webhook payload](https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#push)." }, "event_name": { "description": "The name of the event that triggered the workflow run." @@ -113,7 +113,7 @@ } }, "path": { - "description": "Path on the runner to the file that sets system PATH variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path)." + "description": "Path on the runner to the file that sets system PATH variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see \"[Workflow commands for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path).\"" }, "ref": { "description": "The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by `push`, this is the branch or tag ref that was pushed. For workflows triggered by `pull_request`, this is the pull request merge branch. For workflows triggered by `release`, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is `refs/heads/`, for pull requests it is `refs/pull//merge`, and for tags it is `refs/tags/`. For example, `refs/heads/feature-branch-1`." @@ -169,10 +169,10 @@ "description": "The URL of the GitHub server. For example: `https://github.com`." }, "sha": { - "description": "The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see [Events that trigger workflows.](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows) For example, `ffac537e6cbbf934b08745a378932722df287a53`." + "description": "The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see \"[Events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\" For example, `ffac537e6cbbf934b08745a378932722df287a53`." }, "token": { - "description": "A token to authenticate on behalf of the GitHub App installed on your repository. This is functionally equivalent to the `GITHUB_TOKEN` secret. For more information, see [Automatic token authentication](https://docs.github.com/actions/security-guides/automatic-token-authentication).\nNote: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`." + "description": "A token to authenticate on behalf of the GitHub App installed on your repository. This is functionally equivalent to the `GITHUB_TOKEN` secret. For more information, see \"[Automatic token authentication](https://docs.github.com/actions/security-guides/automatic-token-authentication).\"\nNote: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`." }, "triggering_actor": { "description": "The username of the user that initiated the workflow run. If the workflow run is a re-run, this value may differ from `github.actor`. Any workflow re-runs will use the privileges of `github.actor`, even if the actor initiating the re-run (`github.triggering_actor`) has different privileges." @@ -200,7 +200,7 @@ }, "secrets": { "GITHUB_TOKEN": { - "description": "Automatically created token for each workflow run. For more information, see [Automatic token authentication.](https://docs.github.com/actions/security-guides/automatic-token-authentication)" + "description": "Automatically created token for each workflow run. For more information, see \"[Automatic token authentication](https://docs.github.com/actions/security-guides/automatic-token-authentication).\"" } }, "jobs": { @@ -213,7 +213,7 @@ }, "steps": { "outputs": { - "description": "The set of outputs defined for the step. For more information, see [Metadata syntax for GitHub Actions.](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions)" + "description": "The set of outputs defined for the step. For more information, see \"[Metadata syntax for GitHub Actions](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions).\"" }, "conclusion": { "description": "The result of a completed step after [`continue-on-error`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." @@ -244,7 +244,7 @@ }, "strategy": { "fail-fast": { - "description": "When `true`, all in-progress jobs are canceled if any job in a matrix fails. For more information, see [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast)." + "description": "When `true`, all in-progress jobs are canceled if any job in a matrix fails. For more information, see \"[Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast).\"" }, "job-index": { "description": "The index of the current job in the matrix. **Note:** This number is a zero-based number. The first job's index in the matrix is `0`." @@ -253,7 +253,7 @@ "description": "The total number of jobs in the matrix. **Note:** This number **is not** a zero-based number. For example, for a matrix with four jobs, the value of `job-total` is `4`." }, "max-parallel": { - "description": "The maximum number of jobs that can run simultaneously when using a matrix job strategy. For more information, see [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel)." + "description": "The maximum number of jobs that can run simultaneously when using a matrix job strategy. For more information, see \"[Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel).\"" } } } \ No newline at end of file From fe696132cfd3c09cb756e7c0ac47c8b0004ecec6 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 18:02:55 +0800 Subject: [PATCH 09/10] Update tests --- languageserver/src/context-providers/steps.test.ts | 4 ++-- languageservice/src/complete.expressions.test.ts | 2 +- languageservice/src/hover.expressions.test.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/languageserver/src/context-providers/steps.test.ts b/languageserver/src/context-providers/steps.test.ts index 8fda4a8..d5e1818 100644 --- a/languageserver/src/context-providers/steps.test.ts +++ b/languageserver/src/context-providers/steps.test.ts @@ -99,13 +99,13 @@ it("adds action outputs", async () => { key: "conclusion", value: new data.Null(), description: - "The result of a completed step after `continue-on-error` is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." + "The result of a completed step after [`continue-on-error`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." }, { key: "outcome", value: new data.Null(), description: - "The result of a completed step before `continue-on-error` is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." + "The result of a completed step before [`continue-on-error`](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final conclusion is `success`." } ) }) diff --git a/languageservice/src/complete.expressions.test.ts b/languageservice/src/complete.expressions.test.ts index b420394..a8463ef 100644 --- a/languageservice/src/complete.expressions.test.ts +++ b/languageservice/src/complete.expressions.test.ts @@ -100,7 +100,7 @@ describe("expressions", () => { label: "api_url", documentation: { kind: "markdown", - value: "The URL of the GitHub Actions REST API." + value: "The URL of the GitHub REST API." }, kind: CompletionItemKind.Variable }); diff --git a/languageservice/src/hover.expressions.test.ts b/languageservice/src/hover.expressions.test.ts index e99c4c0..da6f767 100644 --- a/languageservice/src/hover.expressions.test.ts +++ b/languageservice/src/hover.expressions.test.ts @@ -174,7 +174,7 @@ jobs: expect(result).toEqual({ contents: - "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`.", + "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see \"[SHA-2](https://wikipedia.org/wiki/SHA-2).\"\n\nYou can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see \"[Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).\"", range: { start: {line: 5, character: 22}, end: {line: 5, character: 31} From c9afb14da5f5d3d5dd8ce6e49156b73322049641 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 8 Sep 2023 18:14:04 +0800 Subject: [PATCH 10/10] Satisfy prettier --- languageservice/src/hover.expressions.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languageservice/src/hover.expressions.test.ts b/languageservice/src/hover.expressions.test.ts index da6f767..8b5efc2 100644 --- a/languageservice/src/hover.expressions.test.ts +++ b/languageservice/src/hover.expressions.test.ts @@ -174,7 +174,7 @@ jobs: expect(result).toEqual({ contents: - "Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see \"[SHA-2](https://wikipedia.org/wiki/SHA-2).\"\n\nYou can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see \"[Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).\"", + 'Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see "[SHA-2](https://wikipedia.org/wiki/SHA-2)."\n\nYou can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see "[Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)."', range: { start: {line: 5, character: 22}, end: {line: 5, character: 31}