From 8f1a91f5584ebd35dd0eddc9249a54a4442bf2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=20Cai?= Date: Wed, 5 Feb 2025 11:07:51 +0800 Subject: [PATCH] fix: lint --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 708ab1a..9adc026 100644 --- a/README.md +++ b/README.md @@ -35,21 +35,21 @@ documentation. ### V7 -Version 7 of this action updated the runtime to Node 20 - +Version 7 of this action updated the runtime to Node 20 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions All scripts are now run with Node 20 instead of Node 16 and are affected by any breaking changes between Node 16 and 20 -The `previews` input now only applies to GraphQL API calls as REST API previews are no longer necessary - . +The `previews` input now only applies to GraphQL API calls as REST API previews are no longer necessary - https://github.blog/changelog/2021-10-14-rest-api-preview-promotions/. ### V6 -Version 6 of this action updated the runtime to Node 16 - +Version 6 of this action updated the runtime to Node 16 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions All scripts are now run with Node 16 instead of Node 12 and are affected by any breaking changes between Node 12 and 16. ### V5 -Version 5 of this action includes the version 5 of `@actions/github` and `@octokit/plugin-rest-endpoint-methods`. As part of this update, the Octokit context available via `github` no longer has REST methods directly. These methods are available via `github.rest.*` - +Version 5 of this action includes the version 5 of `@actions/github` and `@octokit/plugin-rest-endpoint-methods`. As part of this update, the Octokit context available via `github` no longer has REST methods directly. These methods are available via `github.rest.*` - https://github.com/octokit/plugin-rest-endpoint-methods.js/releases/tag/v5.0.0 For example, `github.issues.createComment` in V4 becomes `github.rest.issues.createComment` in V5 @@ -153,8 +153,7 @@ By default, github-script will use the token provided to your workflow. ```yaml on: issues: - types: [opened] - + # see: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: issues: 'write' @@ -432,14 +431,13 @@ jobs: ### Use scripts with jsDoc support -If you want type support for your scripts, you could use the command below to install the `@actions/github-script` type declaration. - +If you want type support for your scripts, you could use the command below to install the +`@actions/github-script` type declaration. ```sh $ npm i -D @actions/github-script@github:actions/github-script ``` And then add the `jsDoc` declaration to your script like this: - ```js // @ts-check /** @param {import('@actions/github-script').AsyncFunctionArguments} AsyncFunctionArguments */