From b08e8f300e0caafa362239f4e678cfdeac81449a Mon Sep 17 00:00:00 2001 From: wuxh Date: Thu, 12 Jan 2023 22:46:36 +0800 Subject: [PATCH] docs: update docs --- README.md | 24 ++++++++++++++++++++++++ README.zh-CN.md | 24 ++++++++++++++++++++++++ web/docs/base.md | 21 +++++++++++++++++++++ web/docs/base.zh-CN.md | 21 +++++++++++++++++++++ 4 files changed, 90 insertions(+) diff --git a/README.md b/README.md index 035b9d2..732e829 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,7 @@ When the following list does not have the features you want, you can submit it i - [`unlock-issue`](#unlock-issue) - [`update-comment`](#update-comment) - [`update-issue`](#update-issue) + - [`toggle-labels`](#toggle-labels) - 🌟 Advanced - [`check-inactive`](#check-inactive) - [`check-issue`](#check-issue) @@ -747,6 +748,29 @@ Update the specified issue according to the `issue-number`. ⏫ [Back to list](#List) +#### `toggle-labels` + +Toggle the labels of issue. + +```yml +- name: Toggle labels + uses: actions-cool/issues-helper@v3 + with: + actions: 'toggle-labels' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'xx' +``` + +| Param | Desc | Type | Required | +| -- | -- | -- | -- | +| actions | Action type | string | ✔ | +| token | [Token explain](/guide/ref#-token) | string | ✖ | +| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ | +| labels | The toggle labels. Delete if the label already exists, add if it does not exist | string | ✔ | + +⏫ [Back to list](#List) + ### 🌟 Advanced Advanced usage is not recommended to use multiple actions at the same time. diff --git a/README.zh-CN.md b/README.zh-CN.md index a917377..2376724 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -250,6 +250,7 @@ - [`unlock-issue`](#unlock-issue) - [`update-comment`](#update-comment) - [`update-issue`](#update-issue) + - [`toggle-labels`](#toggle-labels) - 🌟 进 阶 - [`check-inactive`](#check-inactive) - [`check-issue`](#check-issue) @@ -750,6 +751,29 @@ jobs: ⏫ [返回列表](#列-表) +#### `toggle-labels` + +切换 issue 的 labels。 + +```yml +- name: Toggle labels + uses: actions-cool/issues-helper@v3 + with: + actions: 'toggle-labels' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'xx' +``` + +| 参数 | 描述 | 类型 | 必填 | +| -- | -- | -- | -- | +| actions | 操作类型 | string | ✔ | +| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ | +| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ | +| labels | 切换 labels。如果 label 已存在则删除,不存在则添加 | string | ✔ | + +⏫ [返回列表](#列-表) + ### 🌟 进 阶 进阶用法不建议 actions 多个一次同时使用。 diff --git a/web/docs/base.md b/web/docs/base.md index 78e0c0b..8085076 100644 --- a/web/docs/base.md +++ b/web/docs/base.md @@ -458,3 +458,24 @@ Update the specified issue according to the `issue-number`. - `state` defaults to `open` - When the option is not filled, it will keep the original + +## `toggle-labels` + +Toggle the labels of issue. + +```yml +- name: Toggle labels + uses: actions-cool/issues-helper@v3 + with: + actions: 'toggle-labels' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'xx' +``` + +| Param | Desc | Type | Required | +| -- | -- | -- | -- | +| actions | Action type | string | ✔ | +| token | [Token explain](/guide/ref#-token) | string | ✖ | +| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ | +| labels | The toggle labels. Delete if the label already exists, add if it does not exist | string | ✔ | diff --git a/web/docs/base.zh-CN.md b/web/docs/base.zh-CN.md index d4bce03..944a35a 100644 --- a/web/docs/base.zh-CN.md +++ b/web/docs/base.zh-CN.md @@ -458,3 +458,24 @@ jobs: - `state` 默认为 `open` - 当可选项不填时,会保持原有 + +## `toggle-labels` + +切换 issue 的 labels。 + +```yml +- name: Toggle labels + uses: actions-cool/issues-helper@v3 + with: + actions: 'toggle-labels' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'xx' +``` + +| 参数 | 描述 | 类型 | 必填 | +| -- | -- | -- | -- | +| actions | 操作类型 | string | ✔ | +| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ | +| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ | +| labels | 切换 labels。如果 label 已存在则删除,不存在则添加 | string | ✔ |