docs: adjust default language

This commit is contained in:
元凛
2022-09-02 17:03:22 +08:00
parent e348bddf55
commit ae3f30b1ef
30 changed files with 3293 additions and 3211 deletions

View File

@@ -1,88 +0,0 @@
---
toc: menu
---
## Is there a charge for this feature?
GitHub Actions is provided free of charge by GitHub. Among them, the `Private` project has a monthly limit of 2000 times, [see details](https://github.com/settings/billing). The `Public` project is unlimited.
### Is there a rate limit?
Yes. The bottom layer of Action uses GitHub REST API. The general situation is 5000 times per hour. It is basically sufficient in principle, and it is also required to avoid invalid requests when defining Action. [Detailed view](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
## Are there any ready-made templates for reference?
Yes.
1. You can use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repository template
2. Personal exercises and tests [Actions](https://github.com/actions-cool/test-issues-helper) repository
3. You can also refer to the warehouse of [online users](/en-US#-who-is-using)
## I want to pause Actions, is there an easy way?
Yes, you can directly modify `actions`. For example: `actions:'create-comment'` is changed to `actions:'#create-comment'`. It is also convenient for recovery.
## So many versions, how to choose?
You can view the detailed [changelog](/en-US/changelog). The latest releases version is recommended.
- Version rules
- Use two-level semantic version, such as v1, v1.1, v2, v2.1
- v1 represents the initial version
- The fixes and additions to the v1 version will be released to the v1.1 version
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2.x version
- After the v2 version, the version will be released strictly according to the three-level semantics, such as v2.0.0, v2.1.0
- Version selection
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
- You can also refer to the update log below to select the version
- The latest v1.x release code will be merged into the 1.x branch
- After the v2 version, the v2 tag is supported, and the latest 2.x code will be synchronized
- It also supports the direct use of branch versions. Such as:
```yml
- name: Issues Helper
uses: actions-cool/issues-helper@main
# or
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
# or
- name: Issues Helper
uses: actions-cool/issues-helper@v2
```
## What should I pay attention to when upgrading from v1.x to v2?
There is only one difference between v1.12 and v2.0.0. That is, `require-permission` in `mark-duplicate` has added the default value `write`.
## v3 changelog
🚀 The refactoring of the v3 version is completed. The main changes are:
1. JS to TS
2. Encapsulate the core functions of the issue into classes for helpers to use
3. Unified prompt information
4. Added automatic release script
Reference for functional changes:
- 🚀 New Feature
- `mark-assignees`: Comment quick settings assignees
- `find-issues`: Conditional query current warehouse issues
- 🐞 Bug Fix
- Fixed `find-comments` return result direction not working
- Fix `lock-issues` lock and comment order issue
- 🛠 Refactor
- `contents` renamed to easy-to-understand `emoji`
- `issue-emojis` renamed to `issue-emoji`
- deleteComment updateComment no longer supports `out-comments`, keeping pure functionality
- Remove title body default
- `month-statistics` removed
## What should I do if there is no function I want here?
You can submit it in [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18).

View File

@@ -2,43 +2,43 @@
toc: menu
---
## 该功能是否收费?
## Is there a charge for this feature?
GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有 2000 次的限制,[具体查看](https://github.com/settings/billing)`Public` 项目无限制。
GitHub Actions is provided free of charge by GitHub. Among them, the `Private` project has a monthly limit of 2000 times, [see details](https://github.com/settings/billing). The `Public` project is unlimited.
### 有没有速率的限制?
### Is there a rate limit?
有的。Action 底层使用的是 GitHub REST API。一般情况是每小时 5000 次。原则上基本是够用的,同时也要求在 Action 定义时,尽量避免无效的请求。[具体查看](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting)
Yes. The bottom layer of Action uses GitHub REST API. The general situation is 5000 times per hour. It is basically sufficient in principle, and it is also required to avoid invalid requests when defining Action. [Detailed view](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
## 有没有现成的模板可以参考?
## Are there any ready-made templates for reference?
有的。
Yes.
1. 你可以使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
2. 个人练习和测试 [Actions](https://github.com/actions-cool/test-issues-helper) 的仓库
3. 也可以来 [线上使用者](/#-谁在使用?) 的仓库参照
1. You can use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repository template
2. Personal exercises and tests [Actions](https://github.com/actions-cool/test-issues-helper) repository
3. You can also refer to the warehouse of [online users](#-who-is-using)
## 我想暂停 Actions有没有简单的办法
## I want to pause Actions, is there an easy way?
有的,你可以将直接修改 `actions`。例如:`actions: 'create-comment'` 修改为 `actions: '#create-comment'`。同时也方便恢复。
Yes, you can directly modify `actions`. For example: `actions:'create-comment'` is changed to `actions:'#create-comment'`. It is also convenient for recovery.
## 这么多版本,如何选择?
## So many versions, how to choose?
你可以查看详细的 [更新日志](/changelog)。推荐采用最新 releases 版本。
You can view the detailed [changelog](/changelog). The latest releases version is recommended.
- 版本规则
- 采用两级语义化版本如v1、v1.1、v2、v2.1
- v1 表示初始版本
- 对 v1 版本的修复和新增会发布到 v1.1 版本
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2.x 版本
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0v2.1.0
- Version rules
- Use two-level semantic version, such as v1, v1.1, v2, v2.1
- v1 represents the initial version
- The fixes and additions to the v1 version will be released to the v1.1 version
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2.x version
- After the v2 version, the version will be released strictly according to the three-level semantics, such as v2.0.0, v2.1.0
- 版本选择
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
- 同时也可参照下面的更新日志来选择版本
- 最新的 v1.x release 代码会合并到 1.x 分支中
- v2 版本后支持使用 v2 tag将同步最新 2.x 代码
- 支持直接使用分支版本。如:
- Version selection
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
- You can also refer to the update log below to select the version
- The latest v1.x release code will be merged into the 1.x branch
- After the v2 version, the v2 tag is supported, and the latest 2.x code will be synchronized
- It also supports the direct use of branch versions. Such as:
```yml
- name: Issues Helper
@@ -52,37 +52,37 @@ GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有
# or
- name: Issues Helper
uses: actions-cool/issues-helper@v3
uses: actions-cool/issues-helper@v2
```
## 从 v1.x 升级到 v2有什么注意的地方吗
## What should I pay attention to when upgrading from v1.x to v2?
v1.12 v2.0.0 版本的差别只有一处。即 `mark-duplicate` 中的 `require-permission` 增加了默认值 `write`
There is only one difference between v1.12 and v2.0.0. That is, `require-permission` in `mark-duplicate` has added the default value `write`.
## v3 变更
## v3 changelog
🚀 v3 版本重构完成,主要变更内容:
🚀 The refactoring of the v3 version is completed. The main changes are:
1. JS to TS
2. 将 issue 核心功能封装成为类供 helper 使用
3. 提示信息统一
4. 增加自动发布脚本
2. Encapsulate the core functions of the issue into classes for helpers to use
3. Unified prompt information
4. Added automatic release script
功能变更参考:
Reference for functional changes:
- 🚀 New Feature
- `mark-assignees`: 评论快捷设置 assignees
- `find-issues`: 条件查询当前仓库 issues
- `mark-assignees`: Comment quick settings assignees
- `find-issues`: Conditional query current warehouse issues
- 🐞 Bug Fix
- 修复 `find-comments` 返回结果 direction 未起作用
- 修复 `lock-issues` lock comment 的顺序问题
- Fixed `find-comments` return result direction not working
- Fix `lock-issues` lock and comment order issue
- 🛠 Refactor
- contents 更名为容易理解的 emoji
- `issue-emojis` 更名为 `issue-emoji`
- deleteComment updateComment 不再支持 `out-comments`,保持纯粹功能
- 移除 title body 默认值
- `month-statistics` 移除
- `contents` renamed to easy-to-understand `emoji`
- `issue-emojis` renamed to `issue-emoji`
- deleteComment updateComment no longer supports `out-comments`, keeping pure functionality
- Remove title body default
- `month-statistics` removed
## 如果这里没有我想要的功能,该怎么办?
## What should I do if there is no function I want here?
你可以在 issues 中提出。
You can submit it in [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18).

View File

@@ -0,0 +1,88 @@
---
toc: menu
---
## 该功能是否收费?
GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有 2000 次的限制,[具体查看](https://github.com/settings/billing)。`Public` 项目无限制。
### 有没有速率的限制?
有的。Action 底层使用的是 GitHub REST API。一般情况是每小时 5000 次。原则上基本是够用的,同时也要求在 Action 定义时,尽量避免无效的请求。[具体查看](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting)。
## 有没有现成的模板可以参考?
有的。
1. 你可以使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
2. 个人练习和测试 [Actions](https://github.com/actions-cool/test-issues-helper) 的仓库
3. 也可以来 [线上使用者](/zh-CN/#-谁在使用?) 的仓库参照
## 我想暂停 Actions有没有简单的办法
有的,你可以将直接修改 `actions`。例如:`actions: 'create-comment'` 修改为 `actions: '#create-comment'`。同时也方便恢复。
## 这么多版本,如何选择?
你可以查看详细的 [更新日志](/zh-CN/changelog)。推荐采用最新 releases 版本。
- 版本规则
- 采用两级语义化版本如v1、v1.1、v2、v2.1
- v1 表示初始版本
- 对 v1 版本的修复和新增会发布到 v1.1 版本
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2.x 版本
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
- 版本选择
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
- 同时也可参照下面的更新日志来选择版本
- 最新的 v1.x release 代码会合并到 1.x 分支中
- v2 版本后支持使用 v2 tag将同步最新 2.x 代码
- 支持直接使用分支版本。如:
```yml
- name: Issues Helper
uses: actions-cool/issues-helper@main
# or
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
# or
- name: Issues Helper
uses: actions-cool/issues-helper@v3
```
## 从 v1.x 升级到 v2有什么注意的地方吗
v1.12 和 v2.0.0 版本的差别只有一处。即 `mark-duplicate` 中的 `require-permission` 增加了默认值 `write`
## v3 变更
🚀 v3 版本重构完成,主要变更内容:
1. JS to TS
2. 将 issue 核心功能封装成为类供 helper 使用
3. 提示信息统一
4. 增加自动发布脚本
功能变更参考:
- 🚀 New Feature
- `mark-assignees`: 评论快捷设置 assignees
- `find-issues`: 条件查询当前仓库 issues
- 🐞 Bug Fix
- 修复 `find-comments` 返回结果 direction 未起作用
- 修复 `lock-issues` lock 与 comment 的顺序问题
- 🛠 Refactor
- contents 更名为容易理解的 emoji
- `issue-emojis` 更名为 `issue-emoji`
- deleteComment updateComment 不再支持 `out-comments`,保持纯粹功能
- 移除 title body 默认值
- `month-statistics` 移除
## 如果这里没有我想要的功能,该怎么办?
你可以在 issues 中提出。

View File

@@ -1,23 +0,0 @@
## Introduction
The Issues Helper is a GitHub Action that easily helps you automatically manage issues.
### What are GitHub Actions?
Automate, customize, and execute your software development workflows right in your repository with GitHub Actions. You can discover, create, and share actions to perform any job you'd like, including CI/CD, and combine actions in a completely customized workflow. [More](https://docs.github.com/en/free-pro-team@latest/actions).
`issues-helper` is based on this, using GitHub Actions to help you deal with various operations on issues.
### ✨ Feature
- 😎 Complete free
- 🚀 Fully automatic
- 🏖 Hosted on the GitHub server, as long as GitHub is not down, it is not affected
### ⚡ Feedback
You are very welcome to try it out and put forward your comments. You can use the following methods:
- Report bugs or consult with [Issue](https://github.com/actions-cool/issues-helper/issues)
- Discuss via [Discussions](https://github.com/actions-cool/issues-helper/discussions)
- Submit [Pull Request](https://github.com/actions-cool/issues-helper/pulls) to improve the code of `issues-helper`

View File

@@ -1,23 +1,23 @@
## 介 绍
## Introduction
Issues 助手是一个轻松帮你自动管理 issues 的 GitHub Action。
The Issues Helper is a GitHub Action that easily helps you automatically manage issues.
### GitHub Actions 是什么?
### What are GitHub Actions?
GitHub Actions 是由 GitHub 官方提供在存储库中自动化、自定义和执行软件开发工作流程。您可以发现创建和共享操作以执行所需的任何工作包括CI / CD并在完全定制的工作流程中组合操作。[更多介绍](https://docs.github.com/en/free-pro-team@latest/actions)
Automate, customize, and execute your software development workflows right in your repository with GitHub Actions. You can discover, create, and share actions to perform any job you'd like, including CI/CD, and combine actions in a completely customized workflow. [More](https://docs.github.com/en/free-pro-team@latest/actions).
`issues-helper` 就是以此为基础,利用 GitHub Actions 来帮你处理各种关于 issue 方面的操作。
`issues-helper` is based on this, using GitHub Actions to help you deal with various operations on issues.
### ✨ 特性
### ✨ Feature
- 😎 完全免费
- 🚀 全自动操作
- 🏖 托管于 GitHub 服务器,只要 GitHub 不宕机,它就不受影响
- 😎 Complete free
- 🚀 Fully automatic
- 🏖 Hosted on the GitHub server, as long as GitHub is not down, it is not affected
### ⚡ 反馈
### ⚡ Feedback
非常欢迎你来尝试使用,并提出意见,你可以通过以下方式:
You are very welcome to try it out and put forward your comments. You can use the following methods:
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码
- Report bugs or consult with [Issue](https://github.com/actions-cool/issues-helper/issues)
- Discuss via [Discussions](https://github.com/actions-cool/issues-helper/discussions)
- Submit [Pull Request](https://github.com/actions-cool/issues-helper/pulls) to improve the code of `issues-helper`

View File

@@ -0,0 +1,23 @@
## 介 绍
Issues 助手是一个轻松帮你自动管理 issues 的 GitHub Action。
### GitHub Actions 是什么?
GitHub Actions 是由 GitHub 官方提供在存储库中自动化、自定义和执行软件开发工作流程。您可以发现创建和共享操作以执行所需的任何工作包括CI / CD并在完全定制的工作流程中组合操作。[更多介绍](https://docs.github.com/en/free-pro-team@latest/actions)。
`issues-helper` 就是以此为基础,利用 GitHub Actions 来帮你处理各种关于 issue 方面的操作。
### ✨ 特性
- 😎 完全免费
- 🚀 全自动操作
- 🏖 托管于 GitHub 服务器,只要 GitHub 不宕机,它就不受影响
### ⚡ 反馈
非常欢迎你来尝试使用,并提出意见,你可以通过以下方式:
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码

View File

@@ -1,51 +0,0 @@
---
toc: menu
---
<Alert type="success">
Here are some things I summarized in my use, I hope it can help you.
</Alert>
## Include judgment in `yml`
```yml
if: contains(github.event.issue.body, 'ie') == false
```
- Triggered when the issue body does not contain `ie`
- The js `includes()` syntax is not supported in the yml
- Case is not checked, `IE` and also similar to `kiekk` can also be satisfied
[More](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#functions).
## Pass value and output in `yml`
```
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
count-lables: 'true'
```
- `count-lables`: Regardless of setting `true` or `'ture'`, all received in the program is in string format
At the same time, the output is also in string format. [See](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs).
- `check-result`: The judgment condition is `if: steps.xxid.outputs.check-result =='true'`
## `GitHub Actions bot` trigger
When an action is set, such as adding a label `x1` to an issue, Actions will automatically add a label `x2` to the issue.
But if this is done by `GitHub Actions bot` (that is, the token in the actions is not passed, or the default `token: ${{ secrets.GITHUB_TOKEN }}` is used), the actions of label `x2` will not be triggered.
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
## `assignees` scope
- The owner or collaborator of the warehouse, if there is an organization, including members
- Participants of the issue, including creators and commenters
- Max 10
## Benchmark
For example: I use a Tag to trigger an Action, and the code that triggers the benchmark will follow the Action definition of the code corresponding to this Tag instead of the main branch code.

View File

@@ -3,22 +3,21 @@ toc: menu
---
<Alert type="success">
这里记录自己在使用中总结的一些东西,希望可以帮助到你。
Here are some things I summarized in my use, I hope it can help you.
</Alert>
## `yml` 中包含判断
## Include judgment in `yml`
```yml
if: contains(github.event.issue.body, 'ie') == false
```
- Triggered when the issue body does not contain `ie`
- The js `includes()` syntax is not supported in the yml
- Case is not checked, `IE` and also similar to `kiekk` can also be satisfied
- 当 issue body 不包含 `ie` 触发
- 测试 yml 中不支持 js `includes()` 语法
- 大小写不校验,`IE` 还有同时类似 `kiekk` 也可满足
[More](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#functions).
更多[查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#functions)。
## `yml` 中传值和输出
## Pass value and output in `yml`
```
with:
@@ -27,26 +26,26 @@ with:
count-lables: 'true'
```
- `count-lables`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
- `count-lables`: Regardless of setting `true` or `'ture'`, all received in the program is in string format
同时输出的也是字符串格式。[参看](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs)
At the same time, the output is also in string format. [See](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs).
- `check-result`:判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
- `check-result`: The judgment condition is `if: steps.xxid.outputs.check-result =='true'`
## `GitHub Actions bot` 触发
## `GitHub Actions bot` trigger
当设置了一个 Actions如为给一个 issue 新增 label `x1`Actions 自动为该 issue 增加 `x2` label。
When an action is set, such as adding a label `x1` to an issue, Actions will automatically add a label `x2` to the issue.
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
But if this is done by `GitHub Actions bot` (that is, the token in the actions is not passed, or the default `token: ${{ secrets.GITHUB_TOKEN }}` is used), the actions of label `x2` will not be triggered.
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
## `assignees` 范围
## `assignees` scope
- 仓库的所有者或协作者,若有组织,包括成员
- issue 的参与者,包括创建者、评论者
- 最多支持 10
- The owner or collaborator of the warehouse, if there is an organization, including members
- Participants of the issue, including creators and commenters
- Max 10
## 运行基准
## Benchmark
比如:我用 Tag 触发一个 Action触发基准的代码就会走这个 Tag 对应代码的 Action 定义,而非主分支代码。
For example: I use a Tag to trigger an Action, and the code that triggers the benchmark will follow the Action definition of the code corresponding to this Tag instead of the main branch code.

View File

@@ -0,0 +1,52 @@
---
toc: menu
---
<Alert type="success">
这里记录自己在使用中总结的一些东西,希望可以帮助到你。
</Alert>
## `yml` 中包含判断
```yml
if: contains(github.event.issue.body, 'ie') == false
```
- 当 issue body 不包含 `ie` 触发
- 测试 yml 中不支持 js `includes()` 语法
- 大小写不校验,`IE` 还有同时类似 `kiekk` 也可满足
更多[查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#functions)。
## `yml` 中传值和输出
```
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
count-lables: 'true'
```
- `count-lables`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
同时输出的也是字符串格式。[参看](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs)。
- `check-result`:判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
## `GitHub Actions bot` 触发
当设置了一个 Actions如为给一个 issue 新增 label `x1`Actions 自动为该 issue 增加 `x2` label。
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
## `assignees` 范围
- 仓库的所有者或协作者,若有组织,包括成员
- issue 的参与者,包括创建者、评论者
- 最多支持 10 个
## 运行基准
比如:我用 Tag 触发一个 Action触发基准的代码就会走这个 Tag 对应代码的 Action 定义,而非主分支代码。

View File

@@ -1,86 +0,0 @@
---
toc: menu
---
## 📍 `token`
Need to have the person token with push permission.
- [Personal token application](https://github.com/settings/tokens)
- Need to check `Full control of private repositories`
- Project add secrets
- Select settings, select secrets, select `New repository secret`
- `Name` is the same as in actions
- `Value` fill in the token just applied by the individual
When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
## 📍 GitHub Docs
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
- [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
## 📍 `outputs` use
```yml
- name: Create issue
uses: actions-cool/issues-helper@v1
id: createissue
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check outputs
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
```
More:
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
## 📍 `includes` check rules
```js
"title-includes": 'x1,x2'
x1
x2
"x1y3y2" true
"y2 x1" true
"x2" true
"x3" false
```
```js
"title-includes": 'x1,x2/y1,y2'
x1 + y1
x2 + y1
x1 + y2
x2 + y2
"x1y3y2" true
"y2 x1" true
"1x2y" false
"x1" false
```
## 📍 `emoji` Type
| content | emoji |
| -- | -- |
| `+1` | 👍 |
| `-1` | 👎 |
| `laugh` | 😄 |
| `confused` | 😕 |
| `heart` | ❤️ |
| `hooray` | 🎉 |
| `rocket` | 🚀 |
| `eyes` | 👀 |
For details, please [view](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions).
## 📍 `comment-id`
Click the `···` icon in the upper right corner of a comment, select `Copy link`, and the number at the end of the url is `comment_id`.

View File

@@ -2,25 +2,25 @@
toc: menu
---
## 📍 `token` 说明
## 📍 `token`
需拥有 push 权限的人员 token。
Need to have the person token with push permission.
- [个人 token 申请](https://github.com/settings/tokens)
- 需勾选 `Full control of private repositories`
- 项目添加 secrets
- 选择 settings,选择 secrets选择 `New repository secret`
- `Name` actions 中保持一致
- `Value` 填写刚才个人申请的 token
- [Personal token application](https://github.com/settings/tokens)
- Need to check `Full control of private repositories`
- Project add secrets
- Select settings, select secrets, select `New repository secret`
- `Name` is the same as in actions
- `Value` fill in the token just applied by the individual
当 actions 不填写 token 时,或输入 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)
When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
## 📍 GitHub 相关文档
## 📍 GitHub Docs
- [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)
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
- [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
## 📍 `outputs` 使用
## 📍 `outputs` use
```yml
- name: Create issue
@@ -33,12 +33,12 @@ toc: menu
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
```
更多查看:
More:
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
## 📍 `includes` 校验规则
## 📍 `includes` check rules
```js
"title-includes": 'x1,x2'
@@ -66,7 +66,7 @@ x2 + y2
"x1" false
```
## 📍 `emoji` 类型
## 📍 `emoji` Type
| content | emoji |
| -- | -- |
@@ -79,8 +79,8 @@ x2 + y2
| `rocket` | 🚀 |
| `eyes` | 👀 |
如需详细了解,可 [查看](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions)
For details, please [view](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions).
## 📍 `comment-id`
点击某个评论右上角 `···` 图标,选择 `Copy link`url 末尾数字即是 `comment_id`
Click the `···` icon in the upper right corner of a comment, select `Copy link`, and the number at the end of the url is `comment_id`.

View File

@@ -0,0 +1,86 @@
---
toc: menu
---
## 📍 `token` 说明
需拥有 push 权限的人员 token。
- [个人 token 申请](https://github.com/settings/tokens)
- 需勾选 `Full control of private repositories`
- 项目添加 secrets
- 选择 settings选择 secrets选择 `New repository secret`
- `Name` 与 actions 中保持一致
- `Value` 填写刚才个人申请的 token
当 actions 不填写 token 时,或输入 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)。
## 📍 GitHub 相关文档
- [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)
## 📍 `outputs` 使用
```yml
- name: Create issue
uses: actions-cool/issues-helper@v1
id: createissue
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check outputs
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
```
更多查看:
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
## 📍 `includes` 校验规则
```js
"title-includes": 'x1,x2'
x1
x2
"x1y3y2" true
"y2 x1" true
"x2" true
"x3" false
```
```js
"title-includes": 'x1,x2/y1,y2'
x1 + y1
x2 + y1
x1 + y2
x2 + y2
"x1y3y2" true
"y2 x1" true
"1x2y" false
"x1" false
```
## 📍 `emoji` 类型
| content | emoji |
| -- | -- |
| `+1` | 👍 |
| `-1` | 👎 |
| `laugh` | 😄 |
| `confused` | 😕 |
| `heart` | ❤️ |
| `hooray` | 🎉 |
| `rocket` | 🚀 |
| `eyes` | 👀 |
如需详细了解,可 [查看](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions)。
## 📍 `comment-id`
点击某个评论右上角 `···` 图标,选择 `Copy link`url 末尾数字即是 `comment_id`

View File

@@ -1,67 +0,0 @@
## Quick start
### 1. New Action
Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.
![](https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*D5dMQLk2pI0AAAAAAAAAAAAAARQnAQ)
Click `New workflow` to add.
![](https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*cClPRIW6HKcAAAAAAAAAAAAAARQnAQ)
<Alert type="success">
You can click <Badge>set up a workflow yourself</Badge> to add a custom action, or you can apply a new action based on a template. <a target="_blank" href="https://github.com/actions-cool/.github">Templates</a>.
</Alert>
### 2. Edit Action
Actions storage address is fixed, unified as `/.github/workflows/xx.yml`.
Let's take the example of the home page and explain it in detail. The corresponding scenario is: when an issue adds the `help wanted` tag, the system will automatically comment.
```yml
name: Issue Reply
on:
issues:
types: [labeled]
jobs:
reply-helper:
runs-on: ubuntu-latest
steps:
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome PR。
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈欢迎PR。
```
- `YML` syntax reference
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
- `name`: The workflow name
- Actions workflow name, can be customized according to actual situation
- `on`: The action trigger condition
- Reference [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
- `uses`: Use actions name
- `uses: actions-cool/issues-helper@v2.0.0`。Please [refer](/en-US/changelog) to version selection
- `issues-hepler` parameter
- `actions`: The name of the function used, **required**. Support multiple, separated by commas, such as `create-comment,close-issue` means comment and close issue
- `token`: A person who needs to have push permission token
- [More view](/en-US/guide/ref#-token)
- `issue-number`: Incoming parameter, here means the number of the current issue. If you are confused about the writing, you can [view](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context)
- `body`: Incoming parameters, here means the content of the current comment
### 3. Enable Action
When you finish writing and submit to the master branch, you can automatically enable the workflow, and the trigger conditions follow the definition of `on`.
😏 I believe that you have a general understanding of `how to use`, do you want to try it quickly?
Please check the functions you need in [Basic](/en-US/base) and [Advanced](/en-US/advanced) for flexible reference.

View File

@@ -1,24 +1,24 @@
## 快速开始
## Quick start
### 1. 新建 Action
### 1. New Action
点击仓库的 Actions,若已增加过 Actions会显示如下界面。
Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.
![](https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*D5dMQLk2pI0AAAAAAAAAAAAAARQnAQ)
点击 `New workflow` 新增。
Click `New workflow` to add.
![](https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*cClPRIW6HKcAAAAAAAAAAAAAARQnAQ)
<Alert type="success">
你可以点击 <Badge>set up a workflow yourself</Badge> 新增一个自定义 action也可以根据模板来套用新增一个 action。<a target="_blank" href="https://github.com/actions-cool/.github">模板使用</a>
You can click <Badge>set up a workflow yourself</Badge> to add a custom action, or you can apply a new action based on a template. <a target="_blank" href="https://github.com/actions-cool/.github">Templates</a>.
</Alert>
### 2. 编写 Action
### 2. Edit Action
Actions 存放地址是固定的,统一为 `/.github/workflows/xx.yml`
Actions storage address is fixed, unified as `/.github/workflows/xx.yml`.
下面拿首页的例子详细说明下。对应场景为:当一个 issue 新增 `help wanted` 标签时,系统会自动进行评论。
Let's take the example of the home page and explain it in detail. The corresponding scenario is: when an issue adds the `help wanted` tag, the system will automatically comment.
```yml
name: Issue Reply
@@ -43,25 +43,25 @@ jobs:
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈欢迎PR。
```
- `YML` 语法参考
- [GitHub Actions 语法](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
- `name`workflow 名称
- Actions 流程名称,可根据实际情况自定义
- `on`action 触发条件
- 参考 [工作流触发机制](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
- `uses`:使用 actions 名称
- `uses: actions-cool/issues-helper@v2.0.0`版本选择请 [参考](/changelog)
- `issues-hepler` 参数
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
- `token`:需拥有 push 权限的人员 token
- 更多 [参考](/guide/ref#-token-说明)
- `issue-number`:传入参数,这里表示当前 issue 的编号。如果你对写法疑惑,可 [查看](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context)
- `body`:传入参数,这里表示当前进行评论的内容
- `YML` syntax reference
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
- `name`: The workflow name
- Actions workflow name, can be customized according to actual situation
- `on`: The action trigger condition
- Reference [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
- `uses`: Use actions name
- `uses: actions-cool/issues-helper@v2.0.0`Please [refer](/changelog) to version selection
- `issues-hepler` parameter
- `actions`: The name of the function used, **required**. Support multiple, separated by commas, such as `create-comment,close-issue` means comment and close issue
- `token`: A person who needs to have push permission token
- [More view](/guide/ref#-token)
- `issue-number`: Incoming parameter, here means the number of the current issue. If you are confused about the writing, you can [view](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context)
- `body`: Incoming parameters, here means the content of the current comment
### 3. 启用 Action
### 3. Enable Action
当你完成编写完成提交到主分支后,即可自动启用该 workflow触发条件遵循 `on` 的定义。
When you finish writing and submit to the master branch, you can automatically enable the workflow, and the trigger conditions follow the definition of `on`.
😏 相信到这里你已经对 `如何使用` 有了大概的了解,是不是想快点尝试一下。
😏 I believe that you have a general understanding of `how to use`, do you want to try it quickly?
下面请在 [基 础](/base) 和 [进 阶](/advanced) 查看你需要的功能,灵活参考。
Please check the functions you need in [Basic](/base) and [Advanced](/advanced) for flexible reference.

View File

@@ -0,0 +1,67 @@
## 快速开始
### 1. 新建 Action
点击仓库的 Actions若已增加过 Actions会显示如下界面。
![](https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*D5dMQLk2pI0AAAAAAAAAAAAAARQnAQ)
点击 `New workflow` 新增。
![](https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*cClPRIW6HKcAAAAAAAAAAAAAARQnAQ)
<Alert type="success">
你可以点击 <Badge>set up a workflow yourself</Badge> 新增一个自定义 action也可以根据模板来套用新增一个 action。<a target="_blank" href="https://github.com/actions-cool/.github">模板使用</a>
</Alert>
### 2. 编写 Action
Actions 存放地址是固定的,统一为 `/.github/workflows/xx.yml`
下面拿首页的例子详细说明下。对应场景为:当一个 issue 新增 `help wanted` 标签时,系统会自动进行评论。
```yml
name: Issue Reply
on:
issues:
types: [labeled]
jobs:
reply-helper:
runs-on: ubuntu-latest
steps:
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome PR。
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈欢迎PR。
```
- `YML` 语法参考
- [GitHub Actions 语法](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
- `name`workflow 名称
- Actions 流程名称,可根据实际情况自定义
- `on`action 触发条件
- 参考 [工作流触发机制](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
- `uses`:使用 actions 名称
- `uses: actions-cool/issues-helper@v2.0.0`。版本选择请 [参考](/zh-CN/changelog)
- `issues-hepler` 参数
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
- `token`:需拥有 push 权限的人员 token
- 更多 [参考](/zh-CN/guide/ref#-token-说明)
- `issue-number`:传入参数,这里表示当前 issue 的编号。如果你对写法疑惑,可 [查看](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context)
- `body`:传入参数,这里表示当前进行评论的内容
### 3. 启用 Action
当你完成编写完成提交到主分支后,即可自动启用该 workflow触发条件遵循 `on` 的定义。
😏 相信到这里你已经对 `如何使用` 有了大概的了解,是不是想快点尝试一下。
下面请在 [基 础](/zh-CN/base) 和 [进 阶](/zh-CN/advanced) 查看你需要的功能,灵活参考。