docs: update doc

This commit is contained in:
xrkffgg
2020-12-23 18:08:01 +08:00
parent 2feccec244
commit c1a7298f57
2 changed files with 46 additions and 38 deletions

View File

@@ -4,19 +4,19 @@ English | [简体中文](./README.zh-CN.md)
![ci](https://github.com/actions-cool/issue-helper/workflows/ci/badge.svg) ![ci](https://github.com/actions-cool/issue-helper/workflows/ci/badge.svg)
一个帮你处理 issue 的 GitHub Action A GitHub Action to help you deal with issues
## 😎 为什么用 GitHub Action ## 😎 Why use GitHub Action?
1. 完全免费。 1. Complete free.
2. 全自动操作。 2. Fully automatic.
3. 托管于 GitHub 服务器,只要 GitHub 不宕机,它就会一直跑下去。 3. Hosted on the GitHub server, as long as GitHub is not down, it will keep running.
> Private 项目每月有 2000 次的限制,[具体查看](https://github.com/settings/billing)Public 项目无限制。 > Private projects have a limit of 2000 times per month, [Specific view](https://github.com/settings/billing). Public are unlimited.
## 列 表 ## List
-基 础 -Base
- [`add-assignees`](#add-assignees) - [`add-assignees`](#add-assignees)
- [`add-labels`](#add-labels) - [`add-labels`](#add-labels)
- [`close-issue`](#close-issue) - [`close-issue`](#close-issue)
@@ -30,17 +30,17 @@ English | [简体中文](./README.zh-CN.md)
- [`unlock-issue`](#unlock-issue) - [`unlock-issue`](#unlock-issue)
- [`update-comment`](#update-comment) - [`update-comment`](#update-comment)
- [`update-issue`](#update-issue) - [`update-issue`](#update-issue)
-进 阶 -Advanced
- [`check-inactive`](#check-inactive) - [`check-inactive`](#check-inactive)
- [`close-issues`](#close-issues) - [`close-issues`](#close-issues)
- [`find-comments`](#find-comments) - [`find-comments`](#find-comments)
- [`lock-issues`](#lock-issues) - [`lock-issues`](#lock-issues)
- 🌰 例 子 - 🌰 Example
- [`find-comments + create-comment + update-comment`](#find-comments--create-comment--update-comment) - [`find-comments + create-comment + update-comment`](#find-comments--create-comment--update-comment)
## 🚀 使 用 ## 🚀 Usage
### ⭐ 基 础 ### ⭐ Base
为了更好的展示功能,下面以实际场景举例,请灵活参考。 为了更好的展示功能,下面以实际场景举例,请灵活参考。
@@ -80,7 +80,7 @@ jobs:
- [on 参考](#github-docs) - [on 参考](#github-docs)
- `${{ github.event.issue.number }}` 表示当前 issue[更多参考](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events) - `${{ github.event.issue.number }}` 表示当前 issue[更多参考](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `add-labels` #### `add-labels`
@@ -96,7 +96,7 @@ on:
jobs: jobs:
add-labels: add-labels:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.issue.body.indexOf('Create by specifying way') == -1 if: contains(github.event.issue.body, 'xxx') == false
steps: steps:
- name: Add labels - name: Add labels
uses: actions-cool/issue-helper@v1 uses: actions-cool/issue-helper@v1
@@ -114,7 +114,7 @@ jobs:
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
| labels | 新增的 labels。当不填或者为空字符、空数组时不新增 | string \| string\[] | ✖ | v1 | | labels | 新增的 labels。当不填或者为空字符、空数组时不新增 | string \| string\[] | ✖ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `close-issue` #### `close-issue`
@@ -136,7 +136,7 @@ jobs:
| token | [token 说明](#token) | string | ✔ | v1 | | token | [token 说明](#token) | string | ✔ | v1 |
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `create-comment` #### `create-comment`
@@ -180,7 +180,7 @@ jobs:
- 返回 `comment-id`,可用于之后操作。[用法参考](#outputs-使用) - 返回 `comment-id`,可用于之后操作。[用法参考](#outputs-使用)
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者 - `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `create-issue` #### `create-issue`
@@ -223,7 +223,7 @@ jobs:
- `body` 默认值同上 - `body` 默认值同上
- 返回 `issue-number`[用法参考](#outputs-使用) - 返回 `issue-number`[用法参考](#outputs-使用)
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `delete-comment` #### `delete-comment`
@@ -244,7 +244,7 @@ jobs:
| token | [token 说明](#token) | string | ✔ | v1 | | token | [token 说明](#token) | string | ✔ | v1 |
| comment-id | 指定的 comment | number | ✔ | v1 | | comment-id | 指定的 comment | number | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `lock-issue` #### `lock-issue`
@@ -276,7 +276,7 @@ jobs:
| token | [token 说明](#token) | string | ✔ | v1 | | token | [token 说明](#token) | string | ✔ | v1 |
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `open-issue` #### `open-issue`
@@ -297,7 +297,7 @@ jobs:
| token | [token 说明](#token) | string | ✔ | v1 | | token | [token 说明](#token) | string | ✔ | v1 |
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `remove-assignees` #### `remove-assignees`
@@ -320,7 +320,7 @@ jobs:
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
| assignees | 移除的指定人。当为空字符、空数组时,不进行移除 | string \| string\[] | ✔ | v1 | | assignees | 移除的指定人。当为空字符、空数组时,不进行移除 | string \| string\[] | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `set-labels` #### `set-labels`
@@ -343,7 +343,7 @@ jobs:
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
| labels | labels 设置。当空字符、空数组时,会移除所有 | string \| string\[] | ✔ | v1 | | labels | labels 设置。当空字符、空数组时,会移除所有 | string \| string\[] | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `unlock-issue` #### `unlock-issue`
@@ -364,7 +364,7 @@ jobs:
| token | [token 说明](#token) | string | ✔ | v1 | | token | [token 说明](#token) | string | ✔ | v1 |
| issue-number | 指定的 issue | number | ✔ | v1 | | issue-number | 指定的 issue | number | ✔ | v1 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `update-comment` #### `update-comment`
@@ -404,7 +404,7 @@ jobs:
- `body` 不输入时,会保持原有 - `body` 不输入时,会保持原有
- `update-mode``append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效 - `update-mode``append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `update-issue` #### `update-issue`
@@ -442,9 +442,9 @@ jobs:
- `state` 默认为 `open` - `state` 默认为 `open`
- 当可选项不填时,会保持原有 - 当可选项不填时,会保持原有
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
### ⭐ 进 阶 ### ⭐ Advanced
进阶用法不建议 actions 多重使用。 进阶用法不建议 actions 多重使用。
@@ -533,7 +533,7 @@ jobs:
- `issue-assignee`:不支持多人。不输入或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues - `issue-assignee`:不支持多人。不输入或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不输入时,会查询所有 - `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不输入时,会查询所有
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `find-comments` #### `find-comments`
@@ -571,7 +571,7 @@ jobs:
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序 - `direction` 默认为升序,只有设置 `desc` 时,会返回降序
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0 - 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
#### `lock-issues` #### `lock-issues`
@@ -616,7 +616,7 @@ jobs:
- `issue-assignee`:不支持多人。不输入或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues - `issue-assignee`:不支持多人。不输入或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不输入时,会查询所有 - `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不输入时,会查询所有
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
## 🌰 例 子 ## 🌰 例 子
@@ -668,7 +668,7 @@ jobs:
update-mode: 'append' update-mode: 'append'
``` ```
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
## 🎁 参 考 ## 🎁 参 考
@@ -685,7 +685,7 @@ jobs:
当 actions 不填写 token 时,会默认为 github-actions <kbd>bot</kbd> 当 actions 不填写 token 时,会默认为 github-actions <kbd>bot</kbd>
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
### `outputs` 使用 ### `outputs` 使用
@@ -705,7 +705,7 @@ jobs:
- [GitHub Actions 语法](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on) - [GitHub Actions 语法](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
- [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows) - [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
### Reactions types ### Reactions types
@@ -720,13 +720,17 @@ jobs:
| `rocket` | 🚀 | | `rocket` | 🚀 |
| `eyes` | 👀 | | `eyes` | 👀 |
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
### `comment-id` 获取 ### `comment-id` 获取
点击某个评论右上角 `···` 图标,选择 `Copy link`url 末尾数字即是 `comment_id` 点击某个评论右上角 `···` 图标,选择 `Copy link`url 末尾数字即是 `comment_id`
⏫ [返回列表](#列-表) ⏫ [返回列表](#List)
## Actions 模板
[GitHub Actions workflow template](https://github.com/actions-cool/.github) Fork 后,可直接使用模板。
## 💖 谁在使用? ## 💖 谁在使用?

View File

@@ -1,10 +1,10 @@
# 🤖 Issue Helper # 🤖 Issue Helper
English | [简体中文](./README.zh-CN.md) [English](./README.md) | 简体中文
![ci](https://github.com/actions-cool/issue-helper/workflows/ci/badge.svg) ![ci](https://github.com/actions-cool/issue-helper/workflows/ci/badge.svg)
一个帮你处理 issue 的 GitHub Action 一个帮你处理 issues 的 GitHub Action
## 😎 为什么用 GitHub Action ## 😎 为什么用 GitHub Action
@@ -96,7 +96,7 @@ on:
jobs: jobs:
add-labels: add-labels:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.issue.body.indexOf('Create by specifying way') == -1 if: contains(github.event.issue.body, 'xxx') == false
steps: steps:
- name: Add labels - name: Add labels
uses: actions-cool/issue-helper@v1 uses: actions-cool/issue-helper@v1
@@ -728,6 +728,10 @@ jobs:
⏫ [返回列表](#列-表) ⏫ [返回列表](#列-表)
## Actions 模板
[GitHub Actions workflow template](https://github.com/actions-cool/.github) Fork 后,可直接使用模板。
## 💖 谁在使用? ## 💖 谁在使用?
欢迎在[ **这里** ](https://github.com/actions-cool/issue-helper/issues/6)留言。 欢迎在[ **这里** ](https://github.com/actions-cool/issue-helper/issues/6)留言。