mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-10-13 23:33:51 +08:00
docs: up website & sh
This commit is contained in:
19
CHANGELOG.md
19
CHANGELOG.md
@@ -4,8 +4,27 @@
|
|||||||
💄 Perf
|
💄 Perf
|
||||||
📝 Docs
|
📝 Docs
|
||||||
⚡️ Code style
|
⚡️ Code style
|
||||||
|
🛠 refactor
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## v3.0.0
|
||||||
|
|
||||||
|
`2022.02.09`
|
||||||
|
|
||||||
|
- 🚀 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`
|
||||||
|
- deleteComment updateComment no longer supports `out-comments`, keeping pure functionality
|
||||||
|
- Remove title body default
|
||||||
|
- `month-statistics` is removed, can use [issues-month-statistics](https://github.com/actions-cool/issues-month-statistics)
|
||||||
|
|
||||||
|
<!-- V3 -->
|
||||||
|
|
||||||
## v2.5.0
|
## v2.5.0
|
||||||
|
|
||||||
`2021.10.19`
|
`2021.10.19`
|
||||||
|
@@ -1,8 +1,15 @@
|
|||||||
|
## Dev
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
All code is in `/src`.
|
||||||
|
The online code is in `/web`.
|
||||||
|
|
||||||
## release
|
## release
|
||||||
|
|
||||||
完整版本在网页上进行
|
direct `npm run pub`
|
||||||
|
|
||||||
### 替换小版本
|
### 手动
|
||||||
- 删除 v2 tag
|
- 删除 v2 tag
|
||||||
- git push origin :refs/tags/v2
|
- git push origin :refs/tags/v2
|
||||||
- 把最新的 v2.1.0 推送到 远端 v2 tag
|
- 把最新的 v2.1.0 推送到 远端 v2 tag
|
||||||
|
527
README.en-US.md
527
README.en-US.md
@@ -1,20 +1,35 @@
|
|||||||
# 🤖 Issues Helper
|
<p align="center">
|
||||||
|
<a href="https://actions-cool.github.io/issues-helper/">
|
||||||
|
<img width="200" src="https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
[简体中文](./README.md) | English
|
<h1 align="center">🤖 Issues Helper</h1>
|
||||||
|
|
||||||
[](https://github.com/actions-cool/issues-helper/actions)
|
<div align="center">
|
||||||
[](https://github.com/marketplace/actions/issues-helper)
|
|
||||||
[](https://github.com/umijs/dumi)
|
|
||||||
[](https://github.com/prettier/prettier)
|
|
||||||
|
|
||||||
[](https://github.com/actions-cool/issues-helper/releases)
|
|
||||||
[](https://github.com/actions-cool/issues-helper/stargazers)
|
|
||||||
[](https://github.com/actions-cool/issues-helper/discussions)
|
|
||||||
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
|
||||||
|
|
||||||
A GitHub Action that easily helps you automatically manage issues
|
A GitHub Action that easily helps you automatically manage issues
|
||||||
|
|
||||||
[Online documentation](https://actions-cool.github.io/issues-helper) | [Changelog](https://github.com/actions-cool/issues-helper/blob/main/CHANGELOG.md)
|
[](https://github.com/actions-cool/issues-helper/actions)
|
||||||
|
[](https://github.com/marketplace/actions/issues-helper)
|
||||||
|

|
||||||
|
[](https://github.com/umijs/dumi)
|
||||||
|
[](https://github.com/prettier/prettier)
|
||||||
|
|
||||||
|
[](https://github.com/actions-cool/issues-helper/stargazers)
|
||||||
|
[](https://github.com/actions-cool/issues-helper/releases)
|
||||||
|
[](https://github.com/actions-cool/issues-helper/discussions)
|
||||||
|
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
[简体中文](./README.md) | English
|
||||||
|
|
||||||
|
## 🔗 Link
|
||||||
|
|
||||||
|
- [Online documentation](https://actions-cool.github.io/issues-helper)
|
||||||
|
- [Online v2 documentation](https://actions-cool.github.io/issues-helper-2.x/)
|
||||||
|
- [Changelog](./CHANGELOG.md)
|
||||||
|
|
||||||
## 😎 Why use GitHub Action?
|
## 😎 Why use GitHub Action?
|
||||||
|
|
||||||
@@ -169,10 +184,10 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
|||||||
|
|
||||||
## README Badge
|
## README Badge
|
||||||
|
|
||||||
If you think issues-helper can help you, please copy it to the README to support promotion and bring convenience to more repositories:[](https://github.com/actions-cool/issues-helper). [More color see](https://github.com/actions-cool/issues-helper/issues/92).
|
If you think `actions-cool` can help you, please copy it to the README to support promotion and bring convenience to more repositories:[](https://github.com/actions-cool). [More color see](https://github.com/actions-cool/issues-helper/issues/92).
|
||||||
|
|
||||||
```
|
```
|
||||||
[](https://github.com/actions-cool/issues-helper)
|
[](https://github.com/actions-cool)
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⚡ Feedback
|
## ⚡ Feedback
|
||||||
@@ -185,7 +200,7 @@ You are very welcome to try it out and put forward your comments. You can use th
|
|||||||
|
|
||||||
## List
|
## List
|
||||||
|
|
||||||
When the following list does not have the features you want, you can submit it in [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18).
|
When the following list does not have the features you want, you can submit it in [issues](https://github.com/actions-cool/issues-helper/issues).
|
||||||
|
|
||||||
- ⭐ Base
|
- ⭐ Base
|
||||||
- [`add-assignees`](#add-assignees)
|
- [`add-assignees`](#add-assignees)
|
||||||
@@ -196,7 +211,6 @@ When the following list does not have the features you want, you can submit it i
|
|||||||
- [`create-label`](#create-label)
|
- [`create-label`](#create-label)
|
||||||
- [`delete-comment`](#delete-comment)
|
- [`delete-comment`](#delete-comment)
|
||||||
- [`lock-issue`](#lock-issue)
|
- [`lock-issue`](#lock-issue)
|
||||||
- [`mark-duplicate`](#mark-duplicate)
|
|
||||||
- [`open-issue`](#open-issue)
|
- [`open-issue`](#open-issue)
|
||||||
- [`remove-assignees`](#remove-assignees)
|
- [`remove-assignees`](#remove-assignees)
|
||||||
- [`remove-labels`](#remove-labels)
|
- [`remove-labels`](#remove-labels)
|
||||||
@@ -204,16 +218,16 @@ When the following list does not have the features you want, you can submit it i
|
|||||||
- [`unlock-issue`](#unlock-issue)
|
- [`unlock-issue`](#unlock-issue)
|
||||||
- [`update-comment`](#update-comment)
|
- [`update-comment`](#update-comment)
|
||||||
- [`update-issue`](#update-issue)
|
- [`update-issue`](#update-issue)
|
||||||
- [`welcome`](#welcome)
|
|
||||||
- 🌟 Advanced
|
- 🌟 Advanced
|
||||||
- [`check-inactive`](#check-inactive)
|
- [`check-inactive`](#check-inactive)
|
||||||
- [`check-issue`](#check-issue)
|
- [`check-issue`](#check-issue)
|
||||||
- [`close-issues`](#close-issues)
|
- [`close-issues`](#close-issues)
|
||||||
- [`find-comments`](#find-comments)
|
- [`find-comments`](#find-comments)
|
||||||
|
- [`find-issues`](#find-issues)
|
||||||
- [`lock-issues`](#lock-issues)
|
- [`lock-issues`](#lock-issues)
|
||||||
- [`month-statistics`](#month-statistics)
|
- [`mark-assignees`](#mark-assignees)
|
||||||
- 🌰 Example
|
- [`mark-duplicate`](#mark-duplicate)
|
||||||
- [`find-comments + create-comment + update-comment`](#find-comments--create-comment--update-comment)
|
- [`welcome`](#welcome)
|
||||||
|
|
||||||
## 🚀 Usage
|
## 🚀 Usage
|
||||||
|
|
||||||
@@ -237,7 +251,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -246,10 +260,10 @@ jobs:
|
|||||||
random-to: 1
|
random-to: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
||||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||||
@@ -259,6 +273,7 @@ jobs:
|
|||||||
- [Reference to on](#github-docs)
|
- [Reference to on](#github-docs)
|
||||||
- `${{ github.event.issue.number }}` is the current issue. [More references](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
|
- `${{ github.event.issue.number }}` is the current issue. [More references](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
|
||||||
- `assignees` support multiple and separated by comma
|
- `assignees` support multiple and separated by comma
|
||||||
|
- You can assign up to 10 people to each issue
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -279,7 +294,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -287,10 +302,10 @@ jobs:
|
|||||||
labels: 'bug' or 'xx1,xx2'
|
labels: 'bug' or 'xx1,xx2'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
||||||
|
|
||||||
@@ -304,17 +319,17 @@ Close the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
@@ -336,7 +351,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -345,22 +360,21 @@ jobs:
|
|||||||
Hello @${{ github.event.issue.user.login }}. Add some comments.
|
Hello @${{ github.event.issue.user.login }}. Add some comments.
|
||||||
|
|
||||||
你好 @${{ github.event.issue.user.login }}。巴拉巴拉。
|
你好 @${{ github.event.issue.user.login }}。巴拉巴拉。
|
||||||
contents: '+1' or '+1,heart'
|
emoji: '+1' or '+1,heart'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| body | Add comment content | string | ✖ |
|
| body | Add comment content | string | ✔ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| emoji | Add [emoji](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- `body` default is `Currently at ${owner}/${repo}. And this is default comment.`
|
- No action when `body` is empty
|
||||||
- Where `${owner}/${repo}` means the current repo
|
|
||||||
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](#outputs-use)
|
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](#outputs-use)
|
||||||
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
||||||
- `contents` support multiple and separated by comma
|
- `emoji` support multiple and separated by comma
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -380,7 +394,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -388,21 +402,21 @@ jobs:
|
|||||||
body: 'xxxx'
|
body: 'xxxx'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| title | The title of the new issue | string | ✖ |
|
| title | The title of the new issue | string | ✔ |
|
||||||
| body | The body of the new issue | string | ✖ |
|
| body | The body of the new issue | string | ✖ |
|
||||||
| labels | The labels for the new issue | string | ✖ |
|
| labels | The labels for the new issue | string | ✖ |
|
||||||
| assignees | The assignees for the new issue | string | ✖ |
|
| assignees | The assignees for the new issue | string | ✖ |
|
||||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| emoji | Add [emoji](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- `title` default is `Default Title`
|
- No action when `title` is empty
|
||||||
- Return `issue-number`. [Usage reference](#outputs-use)
|
- Return `issue-number`. [Usage reference](#outputs-use)
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
@@ -413,7 +427,7 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create label
|
- name: Create label
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-label'
|
actions: 'create-label'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -422,10 +436,10 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
|
|||||||
label-desc: 'xx'
|
label-desc: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| label-name | Label name, emoji support | string | ✔ |
|
| label-name | Label name, emoji support | string | ✔ |
|
||||||
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||||
| label-desc | Label description | string | ✖ |
|
| label-desc | Label description | string | ✖ |
|
||||||
@@ -441,21 +455,18 @@ According to [`comment-id`](#comment-id) delete the specified comment.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: xxx
|
comment-id: xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
|
||||||
|
|
||||||
- When `out-comments` is entered, `comment-id` does not work
|
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -476,17 +487,17 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| lock-reason | Reason for locking issue | string | ✖ |
|
| lock-reason | Reason for locking issue | string | ✖ |
|
||||||
|
|
||||||
@@ -494,68 +505,23 @@ jobs:
|
|||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
#### `mark-duplicate`
|
|
||||||
|
|
||||||
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Mark Duplicate
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created, edited]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
mark-duplicate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: mark-duplicate
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'mark-duplicate'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
```
|
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | Action type | string | ✔ |
|
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
|
||||||
| duplicate-command | Simple commands can be set, such as: `/d` | string | ✖ |
|
|
||||||
| duplicate-labels | Add additional labels to this issue | string | ✖ |
|
|
||||||
| remove-labels | Set removable labels | string | ✖ |
|
|
||||||
| labels | Replace the labels of the issue | string | ✖ |
|
|
||||||
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
|
|
||||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
|
||||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
|
||||||
|
|
||||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
|
||||||
- `labels`: Highest priority
|
|
||||||
- `close-issue`: Both `true` or `'true'` can take effect
|
|
||||||
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
|
||||||
- If the team member sets the `read` permission, it is `read`
|
|
||||||
- If the external Collaborator is set to `read` permission, it is `read`
|
|
||||||
- Ordinary users have `read` permission
|
|
||||||
- When set `write`, `admin` and `write` meet the conditions
|
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
|
||||||
|
|
||||||
#### `open-issue`
|
#### `open-issue`
|
||||||
|
|
||||||
Open the specified issue.
|
Open the specified issue.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
@@ -566,7 +532,7 @@ Remove the person designated by issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -574,10 +540,10 @@ Remove the person designated by issue.
|
|||||||
assignees: 'xx'
|
assignees: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
||||||
|
|
||||||
@@ -589,7 +555,7 @@ Remove the specified labels.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -597,10 +563,10 @@ Remove the specified labels.
|
|||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
||||||
|
|
||||||
@@ -614,7 +580,7 @@ Replace the labels of issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -622,10 +588,10 @@ Replace the labels of issue.
|
|||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
||||||
|
|
||||||
@@ -637,17 +603,17 @@ Unlock the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
@@ -670,27 +636,26 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: ${{ github.event.comment.id }}
|
comment-id: ${{ github.event.comment.id }}
|
||||||
contents: 'eyes'
|
emoji: 'eyes'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||||
| body | Update the content of comment | string | ✖ |
|
| body | Update the content of comment | string | ✖ |
|
||||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| emoji | Add [reaction](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- When `body` is not entered, it will remain as it is
|
- When `body` is not entered, it will remain as it is
|
||||||
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
||||||
- When `out-comments` is entered, `comment-id` does not work
|
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -700,7 +665,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -711,13 +676,13 @@ Update the specified issue according to the `issue-number`.
|
|||||||
update-mode: 'replace'
|
update-mode: 'replace'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
||||||
| title | Modify the title of the issue | string | ✖ |
|
| title | Modify the title of the issue | string | ✖ |
|
||||||
@@ -725,54 +690,13 @@ Update the specified issue according to the `issue-number`.
|
|||||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||||
| labels | Replace the labels of issue | string | ✖ |
|
| labels | Replace the labels of issue | string | ✖ |
|
||||||
| assignees | Replace the assignees of issue | string | ✖ |
|
| assignees | Replace the assignees of issue | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| emoji | Add [reaction](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- `state` defaults to `open`
|
- `state` defaults to `open`
|
||||||
- When the option is not filled, it will keep the original
|
- When the option is not filled, it will keep the original
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
#### `welcome`
|
|
||||||
|
|
||||||
When an issue is created, the user who created the issue for the first time is welcome.
|
|
||||||
|
|
||||||
If the user is not creating for the first time, there is no operation.
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Welcome
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [opened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
issue-welcome:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: welcome
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'welcome'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
body: hi @${{ github.event.issue.user.login }}, welcome!
|
|
||||||
labels: 'welcome1, welcome2'
|
|
||||||
assignees: 'xx1'
|
|
||||||
issue-contents: '+1, -1, eyes'
|
|
||||||
```
|
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | Action type | string | ✔ |
|
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
|
||||||
| body | Comment on the welcome content, no comment if you leave it blank | string | ✖ |
|
|
||||||
| labels | Add labels to this issue | string | ✖ |
|
|
||||||
| assignees | Add assignees to this issue | string | ✖ |
|
|
||||||
| issue-contents | Add [reaction](#reactions-types) to this issue| string | ✖ |
|
|
||||||
|
|
||||||
- If these 4 options are not filled, no operation
|
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
|
||||||
|
|
||||||
### 🌟 Advanced
|
### 🌟 Advanced
|
||||||
|
|
||||||
Advanced usage is not recommended to use multiple actions at the same time.
|
Advanced usage is not recommended to use multiple actions at the same time.
|
||||||
@@ -793,19 +717,19 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
inactive-day: 30
|
inactive-day: 30
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
|
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
||||||
| labels | Labels filtering | string | ✖ |
|
| labels | Labels filtering | string | ✖ |
|
||||||
| issue-state | State filtering | string | ✖ |
|
| issue-state | State filtering | string | ✖ |
|
||||||
| issue-assignee | Assignee filtering | string | ✖ |
|
| issue-assignee | Assignee filtering | string | ✖ |
|
||||||
@@ -847,7 +771,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -856,10 +780,10 @@ jobs:
|
|||||||
title-includes: 'x1,x2/y1,y2'
|
title-includes: 'x1,x2/y1,y2'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignee-includes | Assignees contains check | string | ✖ |
|
| assignee-includes | Assignees contains check | string | ✖ |
|
||||||
| title-includes | Title contains check | string | ✖ |
|
| title-includes | Title contains check | string | ✖ |
|
||||||
@@ -887,7 +811,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -895,12 +819,12 @@ jobs:
|
|||||||
inactive-day: 7
|
inactive-day: 7
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
|
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
||||||
| labels | Labels filtering | string | ✖ |
|
| labels | Labels filtering | string | ✖ |
|
||||||
| issue-assignee | Assignee filtering | string | ✖ |
|
| issue-assignee | Assignee filtering | string | ✖ |
|
||||||
| issue-creator | Creator filtering | string | ✖ |
|
| issue-creator | Creator filtering | string | ✖ |
|
||||||
@@ -922,7 +846,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -931,10 +855,10 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
body-includes: 'this'
|
body-includes: 'this'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
||||||
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
||||||
@@ -954,6 +878,48 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
|
#### `find-issues`
|
||||||
|
|
||||||
|
Find the current repository, the creator is k , the title contains `this` , the body contains `that`, and the list of issues in the open state.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Find issues
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'find-issues'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-creator: 'k'
|
||||||
|
issue-state: 'open'
|
||||||
|
title-includes: 'this'
|
||||||
|
body-includes: 'that'
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
|
| issue-state | State filtering | string | ✖ |
|
||||||
|
| issue-creator | Creator filtering | string | ✖ |
|
||||||
|
| title-includes | Title filtering | string | ✖ |
|
||||||
|
| body-includes | Body filtering | string | ✖ |
|
||||||
|
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||||
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
|
| direction | Return sort | string | ✖ |
|
||||||
|
|
||||||
|
- Returns `issues` in the following format:
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', created: '', updated: ''},
|
||||||
|
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', created: '', updated: ''},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
|
||||||
|
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
||||||
|
|
||||||
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
#### `lock-issues`
|
#### `lock-issues`
|
||||||
|
|
||||||
Every 3 months at UTC 0 on the 1st, lock all issues that have been filled with the `inactive` label and have not been active for more than 128 days.
|
Every 3 months at UTC 0 on the 1st, lock all issues that have been filled with the `inactive` label and have not been active for more than 128 days.
|
||||||
@@ -970,7 +936,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -978,12 +944,12 @@ jobs:
|
|||||||
inactive-day: 128
|
inactive-day: 128
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
|
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
||||||
| labels | Labels filtering | string | ✖ |
|
| labels | Labels filtering | string | ✖ |
|
||||||
| issue-state | State filtering | string | ✖ |
|
| issue-state | State filtering | string | ✖ |
|
||||||
| issue-assignee | Assignee filtering | string | ✖ |
|
| issue-assignee | Assignee filtering | string | ✖ |
|
||||||
@@ -1002,104 +968,128 @@ jobs:
|
|||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
#### `month-statistics`
|
#### `mark-assignees`
|
||||||
|
|
||||||
At 1 o'clock on the 1st of each month, an issue is generated for the statistics of the previous month.
|
Quickly assign person, only for the issue to add editor comments.
|
||||||
|
|
||||||
```
|
```yml
|
||||||
name: Issue Month Statistics
|
name: Issue Mark Assignees
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
issue_comment:
|
||||||
- cron: "0 1 1 * *"
|
types: [created, edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
month-statistics:
|
mark-duplicate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'mark-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
count-lables: 'true'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| labels | The labels for the new issue | string | ✖ |
|
| assign-command | Simple commands can be set, such as: `/a` | string | ✖ |
|
||||||
| assignees | The assignees for the new issue | string | ✖ |
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||||
| count-lables | Whether the new issue count labels | string | ✖ |
|
|
||||||
| count-comments | Whether the new issue count comments | string | ✖ |
|
|
||||||
|
|
||||||
- The new issue title defaults to `[Current repo] Month Statistics: Year-Month`
|
- `assign-command`: default `/assign`
|
||||||
- `count-lables`: You can set `'true'` to add labels statistics
|
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
||||||
- `count-comments`: You can set `'true'` to add comments statistics
|
- If the team member sets the `read` permission, it is `read`
|
||||||
|
- If the external Collaborator is set to `read` permission, it is `read`
|
||||||
|
- Ordinary users have `read` permission
|
||||||
|
- When set `write`, `admin` and `write` meet the conditions
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
## 🌰 Example
|
#### `mark-duplicate`
|
||||||
|
|
||||||
Flexible reference.
|
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
||||||
|
|
||||||
### `find-comments + create-comment + update-comment`
|
|
||||||
|
|
||||||
Hypothetical scenario: When the issue modification of the `watch` label is added, find out whether there is a comment created by k that contains `<!-- Created by actions-cool/issues-helper -->`, if so, update the comment, If not, add a comment.
|
|
||||||
|
|
||||||
Of course, if you need such a scene, you can directly use [**Maintain One Comment**](https://github.com/actions-cool/maintain-one-comment).
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Test
|
name: Issue Mark Duplicate
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mark-duplicate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: mark-duplicate
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'mark-duplicate'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
|
| duplicate-command | Simple commands can be set, such as: `/d` | string | ✖ |
|
||||||
|
| duplicate-labels | Add additional labels to this issue | string | ✖ |
|
||||||
|
| remove-labels | Set removable labels | string | ✖ |
|
||||||
|
| labels | Replace the labels of the issue | string | ✖ |
|
||||||
|
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
||||||
|
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||||
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||||
|
|
||||||
|
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||||
|
- `labels`: Highest priority
|
||||||
|
- `close-issue`: Both `true` or `'true'` can take effect
|
||||||
|
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
||||||
|
- If the team member sets the `read` permission, it is `read`
|
||||||
|
- If the external Collaborator is set to `read` permission, it is `read`
|
||||||
|
- Ordinary users have `read` permission
|
||||||
|
- When set `write`, `admin` and `write` meet the conditions
|
||||||
|
|
||||||
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
|
#### `welcome`
|
||||||
|
|
||||||
|
When an issue is created, the user who created the issue for the first time is welcome.
|
||||||
|
|
||||||
|
If the user is not creating for the first time, there is no operation.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Issue Welcome
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [edited]
|
types: [opened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
do-test:
|
issue-welcome:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.label.name == 'watch'
|
|
||||||
steps:
|
steps:
|
||||||
- name: find comments
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
id: fcid
|
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
body: hi @${{ github.event.issue.user.login }}, welcome!
|
||||||
comment-auth: k
|
labels: 'welcome1, welcome2'
|
||||||
body-includes: '<!-- Created by actions-cool/issues-helper -->'
|
assignees: 'xx1'
|
||||||
|
issue-emoji: '+1, -1, eyes'
|
||||||
# Output view found content. GitHub default outputs are strings
|
|
||||||
- run: echo find-comments ${{ steps.fcid.outputs.comments }}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: create comment
|
|
||||||
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'create-comment'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issue-number: ${{ github.event.issue.number }}
|
|
||||||
body: |
|
|
||||||
Error
|
|
||||||
<!-- Created by actions-cool/issues-helper -->
|
|
||||||
|
|
||||||
- name: update comment
|
|
||||||
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'update-comment'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
out-comments: ${{ steps.fcid.outputs.comments }}
|
|
||||||
body: |
|
|
||||||
Error Again
|
|
||||||
<!-- Created by actions-cool/issues-helper -->
|
|
||||||
update-mode: 'append'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
|
| body | Comment on the welcome content, no comment if you leave it blank | string | ✖ |
|
||||||
|
| labels | Add labels to this issue | string | ✖ |
|
||||||
|
| assignees | Add assignees to this issue | string | ✖ |
|
||||||
|
| issue-emoji | Add [reaction](#emoji-types) to this issue| string | ✖ |
|
||||||
|
|
||||||
|
- If these 4 options are not filled, no operation
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
## 🎁 Reference
|
## 🎁 Reference
|
||||||
@@ -1130,7 +1120,7 @@ When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`,
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
id: createissue
|
id: createissue
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
@@ -1175,7 +1165,7 @@ x2 + y2
|
|||||||
```
|
```
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
### Reactions types
|
### Emoji types
|
||||||
|
|
||||||
| content | emoji |
|
| content | emoji |
|
||||||
| -- | -- |
|
| -- | -- |
|
||||||
@@ -1196,33 +1186,6 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
|
|||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
## ✨ Version
|
|
||||||
|
|
||||||
- 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 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
|
|
||||||
- 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
|
|
||||||
```
|
|
||||||
|
|
||||||
- v2 [upgrade reference](https://github.com/actions-cool/issues-helper/blob/fix/docs/guide/faq.en-US.md#what-should-i-pay-attention-to-when-upgrading-from-v1x-to-v2)
|
|
||||||
|
|
||||||
## Actions Template
|
## Actions Template
|
||||||
|
|
||||||
- You can directly use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repositorie template
|
- You can directly use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repositorie template
|
||||||
|
499
README.md
499
README.md
@@ -1,20 +1,35 @@
|
|||||||
# 🤖 Issues 助手
|
<p align="center">
|
||||||
|
<a href="https://actions-cool.github.io/issues-helper/">
|
||||||
|
<img width="200" src="https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
简体中文 | [English](./README.en-US.md)
|
<h1 align="center">🤖 Issues 助手</h1>
|
||||||
|
|
||||||
[](https://github.com/actions-cool/issues-helper/actions)
|
<div align="center">
|
||||||
[](https://github.com/marketplace/actions/issues-helper)
|
|
||||||
[](https://github.com/umijs/dumi)
|
|
||||||
[](https://github.com/prettier/prettier)
|
|
||||||
|
|
||||||
[](https://github.com/actions-cool/issues-helper/releases)
|
|
||||||
[](https://github.com/actions-cool/issues-helper/stargazers)
|
|
||||||
[](https://github.com/actions-cool/issues-helper/discussions)
|
|
||||||
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
|
||||||
|
|
||||||
一个轻松帮你自动管理 issues 的 GitHub Action
|
一个轻松帮你自动管理 issues 的 GitHub Action
|
||||||
|
|
||||||
[在线文档](https://actions-cool.github.io/issues-helper/) | [更新日志](https://github.com/actions-cool/issues-helper/blob/main/CHANGELOG.md) | [国内镜像](https://issues-helper.gitee.io/)
|
[](https://github.com/actions-cool/issues-helper/actions)
|
||||||
|
[](https://github.com/marketplace/actions/issues-helper)
|
||||||
|

|
||||||
|
[](https://github.com/umijs/dumi)
|
||||||
|
[](https://github.com/prettier/prettier)
|
||||||
|
|
||||||
|
[](https://github.com/actions-cool/issues-helper/stargazers)
|
||||||
|
[](https://github.com/actions-cool/issues-helper/releases)
|
||||||
|
[](https://github.com/actions-cool/issues-helper/discussions)
|
||||||
|
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
简体中文 | [English](./README.en-US.md)
|
||||||
|
|
||||||
|
## 🔗 链接
|
||||||
|
|
||||||
|
- [在线文档](https://actions-cool.github.io/issues-helper/)
|
||||||
|
- [在线文档 v2 版本](https://actions-cool.github.io/issues-helper-2.x/)
|
||||||
|
- [更新日志](./CHANGELOG.md)
|
||||||
|
|
||||||
## 😎 为什么用 GitHub Action?
|
## 😎 为什么用 GitHub Action?
|
||||||
|
|
||||||
@@ -167,12 +182,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
## README 图标
|
## 💫 图标
|
||||||
|
|
||||||
如果觉得 issues-helper 能帮到您,欢迎复制到 README 中,支持推广,给更多的项目带来便利:[](https://github.com/actions-cool/issues-helper)。[更多样式](https://github.com/actions-cool/issues-helper/issues/92)。
|
如果觉得 actions-cool 能帮到你,欢迎复制到 README 中支持,推广给更多的项目:[](https://github.com/actions-cool),[更多样式](https://github.com/actions-cool/issues-helper/issues/92)。
|
||||||
|
|
||||||
```
|
```
|
||||||
[](https://github.com/actions-cool/issues-helper)
|
[](https://github.com/actions-cool)
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⚡ 反馈
|
## ⚡ 反馈
|
||||||
@@ -185,11 +200,11 @@
|
|||||||
|
|
||||||
也欢迎加入 钉钉交流群
|
也欢迎加入 钉钉交流群
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 列 表
|
## 列 表
|
||||||
|
|
||||||
当以下列表没有你想要的功能时,可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
|
当以下列表没有你想要的功能时,可以在 [issues](https://github.com/actions-cool/issues-helper/issues) 中提出。
|
||||||
|
|
||||||
- ⭐ 基 础
|
- ⭐ 基 础
|
||||||
- [`add-assignees`](#add-assignees)
|
- [`add-assignees`](#add-assignees)
|
||||||
@@ -200,7 +215,6 @@
|
|||||||
- [`create-label`](#create-label)
|
- [`create-label`](#create-label)
|
||||||
- [`delete-comment`](#delete-comment)
|
- [`delete-comment`](#delete-comment)
|
||||||
- [`lock-issue`](#lock-issue)
|
- [`lock-issue`](#lock-issue)
|
||||||
- [`mark-duplicate`](#mark-duplicate)
|
|
||||||
- [`open-issue`](#open-issue)
|
- [`open-issue`](#open-issue)
|
||||||
- [`remove-assignees`](#remove-assignees)
|
- [`remove-assignees`](#remove-assignees)
|
||||||
- [`remove-labels`](#remove-labels)
|
- [`remove-labels`](#remove-labels)
|
||||||
@@ -208,16 +222,16 @@
|
|||||||
- [`unlock-issue`](#unlock-issue)
|
- [`unlock-issue`](#unlock-issue)
|
||||||
- [`update-comment`](#update-comment)
|
- [`update-comment`](#update-comment)
|
||||||
- [`update-issue`](#update-issue)
|
- [`update-issue`](#update-issue)
|
||||||
- [`welcome`](#welcome)
|
|
||||||
- 🌟 进 阶
|
- 🌟 进 阶
|
||||||
- [`check-inactive`](#check-inactive)
|
- [`check-inactive`](#check-inactive)
|
||||||
- [`check-issue`](#check-issue)
|
- [`check-issue`](#check-issue)
|
||||||
- [`close-issues`](#close-issues)
|
- [`close-issues`](#close-issues)
|
||||||
- [`find-comments`](#find-comments)
|
- [`find-comments`](#find-comments)
|
||||||
|
- [`find-issues`](#find-issues)
|
||||||
- [`lock-issues`](#lock-issues)
|
- [`lock-issues`](#lock-issues)
|
||||||
- [`month-statistics`](#month-statistics)
|
- [`mark-assignees`](#mark-assignees)
|
||||||
- 🌰 例 子
|
- [`mark-duplicate`](#mark-duplicate)
|
||||||
- [`find-comments + create-comment + update-comment`](#find-comments--create-comment--update-comment)
|
- [`welcome`](#welcome)
|
||||||
|
|
||||||
## 🚀 使 用
|
## 🚀 使 用
|
||||||
|
|
||||||
@@ -241,7 +255,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -253,16 +267,17 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
|
|
||||||
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
- `actions` 支持多个,需用逗号隔开。如:`add-assignees, add-labels`
|
||||||
- 其中的 `name` 可根据自行根据实际情况修改
|
- 其中的 `name` 可根据自行根据实际情况修改
|
||||||
- [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)
|
||||||
- `assignees` 支持多个,需用逗号隔开
|
- `assignees` 支持多个,需用逗号隔开
|
||||||
|
- assign 最多只能设定 10 个
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -283,18 +298,18 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
labels: 'bug' or 'bug1,bug2'
|
labels: 'bug' or 'bug1, bug2'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
||||||
|
|
||||||
@@ -308,7 +323,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -318,7 +333,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
@@ -340,7 +355,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -349,22 +364,21 @@ jobs:
|
|||||||
Hello ${{ github.event.issue.user.login }}. Add some comments.
|
Hello ${{ github.event.issue.user.login }}. Add some comments.
|
||||||
|
|
||||||
你好 ${{ github.event.issue.user.login }}。巴拉巴拉。
|
你好 ${{ github.event.issue.user.login }}。巴拉巴拉。
|
||||||
contents: '+1' or '+1,heart'
|
emoji: '+1' or '+1,heart'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| body | 新增评论的内容 | string | ✖ |
|
| body | 新增评论的内容 | string | ✔ |
|
||||||
| contents | 为新增评论的增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 为新增评论的增加 [emoji](#emoji-类型) | string | ✖ |
|
||||||
|
|
||||||
- `body` 默认为:`Currently at ${owner}/${repo}. And this is default comment.`
|
- `body` 为空时,无操作
|
||||||
- 其中 `${owner}/${repo}` 表示当前仓库
|
|
||||||
- 返回 `comment-id`,可用于之后操作。[用法参考](#outputs-使用)
|
- 返回 `comment-id`,可用于之后操作。[用法参考](#outputs-使用)
|
||||||
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
|
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
|
||||||
- `contents` 支持多个,需用逗号隔开
|
- `emoji` 支持多个,需用逗号隔开
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -384,7 +398,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -392,21 +406,21 @@ jobs:
|
|||||||
body: 'xxxx'
|
body: 'xxxx'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| title | 新增 issue 的标题 | string | ✖ |
|
| title | 新增 issue 的标题 | string | ✔ |
|
||||||
| body | 新增 issue 的内容 | string | ✖ |
|
| body | 新增 issue 的内容 | string | ✖ |
|
||||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
| contents | 为新增 issue 增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 为新增 issue 增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- `title` 默认为:`Default Title`
|
- `title` 为空时,无操作
|
||||||
- 返回 `issue-number`,[用法参考](#outputs-使用)
|
- 返回 `issue-number`,[用法参考](#outputs-使用)
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
@@ -417,7 +431,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create label
|
- name: Create label
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-label'
|
actions: 'create-label'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -429,7 +443,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| label-name | 标签名称,支持 emoji | string | ✔ |
|
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||||
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||||
| label-desc | 标签描述 | string | ✖ |
|
| label-desc | 标签描述 | string | ✖ |
|
||||||
@@ -445,7 +459,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -455,11 +469,8 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
|
||||||
|
|
||||||
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -480,7 +491,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -490,7 +501,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||||
|
|
||||||
@@ -498,58 +509,13 @@ jobs:
|
|||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
#### `mark-duplicate`
|
|
||||||
|
|
||||||
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Mark Duplicate
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created, edited]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
mark-duplicate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: mark-duplicate
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'mark-duplicate'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
```
|
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | 操作类型 | string | ✔ |
|
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
|
||||||
| duplicate-command | 可设置简洁命令,如:`/d` | string | ✖ |
|
|
||||||
| duplicate-labels | 为该 issue 额外增加 labels | string | ✖ |
|
|
||||||
| remove-labels | 设置可移除的 labels | string | ✖ |
|
|
||||||
| labels | 替换该 issue 的 labels | string | ✖ |
|
|
||||||
| contents | 为该评论的增加 [reaction](#reactions-types) | string | ✖ |
|
|
||||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
|
||||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
|
||||||
|
|
||||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
|
||||||
- `labels`:优先级最高
|
|
||||||
- `close-issue`:`true` 或 `'true'` 均可生效
|
|
||||||
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
|
||||||
- 团队成员若设置 `read` 权限,则为 `read`
|
|
||||||
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
|
||||||
- 普通用户为 `read` 权限
|
|
||||||
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
|
||||||
|
|
||||||
#### `open-issue`
|
#### `open-issue`
|
||||||
|
|
||||||
打开指定 issue。
|
打开指定 issue。
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -559,7 +525,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
@@ -570,7 +536,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -581,7 +547,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
@@ -593,7 +559,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -604,7 +570,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
@@ -618,7 +584,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -629,7 +595,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
||||||
|
|
||||||
@@ -641,7 +607,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -651,7 +617,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
@@ -674,27 +640,25 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: ${{ github.event.comment.id }}
|
comment-id: ${{ github.event.comment.id }}
|
||||||
contents: 'eyes'
|
emoji: 'eyes'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
|
||||||
| body | 更新 comment 的内容 | string | ✖ |
|
| body | 更新 comment 的内容 | string | ✖ |
|
||||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||||
| contents | 增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- `body` 不填时,会保持原有
|
- `body` 不填时,会保持原有
|
||||||
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
||||||
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -704,7 +668,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -715,13 +679,13 @@ jobs:
|
|||||||
update-mode: 'replace'
|
update-mode: 'replace'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
||||||
| title | 修改 issue 的标题 | string | ✖ |
|
| title | 修改 issue 的标题 | string | ✖ |
|
||||||
@@ -729,52 +693,13 @@ jobs:
|
|||||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||||
| labels | 替换 issue 的 labels | string | ✖ |
|
| labels | 替换 issue 的 labels | string | ✖ |
|
||||||
| assignees | 替换 issue 的 assignees | string | ✖ |
|
| assignees | 替换 issue 的 assignees | string | ✖ |
|
||||||
| contents | 增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
- `state` 默认为 `open`
|
- `state` 默认为 `open`
|
||||||
- 当可选项不填时,会保持原有
|
- 当可选项不填时,会保持原有
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
#### `welcome`
|
|
||||||
|
|
||||||
当一个 issue 新建时,对首次新建 issue 的用户进行欢迎。若用户非首次新建,则无操作。
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Welcome
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [opened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
issue-welcome:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: welcome
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'welcome'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
body: hi @${{ github.event.issue.user.login }}, welcome!
|
|
||||||
labels: 'welcome1, welcome2'
|
|
||||||
assignees: 'xx1'
|
|
||||||
issue-contents: '+1, -1, eyes'
|
|
||||||
```
|
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | 操作类型 | string | ✔ |
|
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
|
||||||
| body | 评论欢迎的内容,不填则不评论 | string | ✖ |
|
|
||||||
| labels | 为该 issue 增加 labels | string | ✖ |
|
|
||||||
| assignees | 为该 issue 增加 assignees | string | ✖ |
|
|
||||||
| issue-contents | 为该 issue 增加 [reaction](#reactions-types) | string | ✖ |
|
|
||||||
|
|
||||||
- 若这 4 个可选项都不填,则无操作
|
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
|
||||||
|
|
||||||
### 🌟 进 阶
|
### 🌟 进 阶
|
||||||
|
|
||||||
进阶用法不建议 actions 多个一次同时使用。
|
进阶用法不建议 actions 多个一次同时使用。
|
||||||
@@ -795,7 +720,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -805,9 +730,9 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||||
| contents | 为该评论增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 为该评论增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
| labels | 标签筛选 | string | ✖ |
|
| labels | 标签筛选 | string | ✖ |
|
||||||
| issue-state | 状态筛选 | string | ✖ |
|
| issue-state | 状态筛选 | string | ✖ |
|
||||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||||
@@ -845,7 +770,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -857,7 +782,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||||
| title-includes | 标题包含校验 | string | ✖ |
|
| title-includes | 标题包含校验 | string | ✖ |
|
||||||
@@ -885,7 +810,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -896,9 +821,9 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||||
| contents | 为该评论增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 为该评论增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
| labels | 标签筛选 | string | ✖ |
|
| labels | 标签筛选 | string | ✖ |
|
||||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||||
| issue-creator | 创建人筛选 | string | ✖ |
|
| issue-creator | 创建人筛选 | string | ✖ |
|
||||||
@@ -920,7 +845,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -932,7 +857,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
||||||
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
||||||
@@ -952,6 +877,48 @@ jobs:
|
|||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
|
#### `find-issues`
|
||||||
|
|
||||||
|
查找当前仓库,创建者是 k ,title 包含 `this` ,body 包含 `that`,打开状态的 issues 列表。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Find issues
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'find-issues'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-creator: 'k'
|
||||||
|
issue-state: 'open'
|
||||||
|
title-includes: 'this'
|
||||||
|
body-includes: 'that'
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
|
| issue-state | 状态筛选 | string | ✖ |
|
||||||
|
| issue-creator | 创建者筛选 | string | ✖ |
|
||||||
|
| title-includes | 标题包含过滤,不填时无校验 | string | ✖ |
|
||||||
|
| body-includes | 内容包含过滤,不填时无校验 | string | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
|
| direction | 返回 `issues` 排序 | string | ✖ |
|
||||||
|
|
||||||
|
- 返回 `issues`,格式如下:
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', created: '', updated: ''},
|
||||||
|
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', created: '', updated: ''},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||||
|
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||||
|
|
||||||
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
#### `lock-issues`
|
#### `lock-issues`
|
||||||
|
|
||||||
每 3 个月 1 号 UTC 0 时,锁定已填加 `inactive` label 且 128 天以上未活跃的所有 issues。
|
每 3 个月 1 号 UTC 0 时,锁定已填加 `inactive` label 且 128 天以上未活跃的所有 issues。
|
||||||
@@ -968,7 +935,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -979,9 +946,9 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||||
| contents | 为该评论增加 [reaction](#reactions-types) | string | ✖ |
|
| emoji | 为该评论增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
| labels | 标签筛选 | string | ✖ |
|
| labels | 标签筛选 | string | ✖ |
|
||||||
| issue-state | 状态筛选 | string | ✖ |
|
| issue-state | 状态筛选 | string | ✖ |
|
||||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||||
@@ -1000,104 +967,127 @@ jobs:
|
|||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
#### `month-statistics`
|
#### `mark-assignees`
|
||||||
|
|
||||||
每月 1 号 1 时,生成一个 issue 上月统计。
|
快捷加指定人,仅作用于 issue 新增编辑评论。
|
||||||
|
|
||||||
```
|
```yml
|
||||||
name: Issue Month Statistics
|
name: Issue Mark Assignees
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
issue_comment:
|
||||||
- cron: "0 1 1 * *"
|
types: [created, edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
month-statistics:
|
mark-duplicate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'mark-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
count-lables: 'true'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
| assign-command | 可设置简洁命令,如:`/a` | string | ✖ |
|
||||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||||
| count-lables | 新增 issue 是否统计 labels | string | ✖ |
|
|
||||||
| count-comments | 新增 issue 是否统计 comments | string | ✖ |
|
|
||||||
|
|
||||||
- 新增 `issue` 的标题默认为 `[当前仓库] Month Statistics: 年-月`
|
- `assign-command`:可设置简洁命令。默认:`/assign`
|
||||||
- `count-lables`:可设置 `'true'`,增加 labels 统计
|
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||||
- `count-comments`:可设置 `'true'`,增加 comments 统计
|
- 团队成员若设置 `read` 权限,则为 `read`
|
||||||
|
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
||||||
|
- 普通用户为 `read` 权限
|
||||||
|
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
## 🌰 例 子
|
#### `mark-duplicate`
|
||||||
|
|
||||||
灵活参考。
|
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
||||||
|
|
||||||
### `find-comments + create-comment + update-comment`
|
|
||||||
|
|
||||||
假设场景:当添加了 `watch` label 的 issue 修改时,查找是否有 k 创建的包含 `<!-- Created by actions-cool/issues-helper -->` 的评论,如果有,则更新 comment,如果没有,则新增一个 comment。
|
|
||||||
|
|
||||||
当然,如果你需要这样的场景,可以直接使用 [**Maintain One Comment**](https://github.com/actions-cool/maintain-one-comment)。
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Test
|
name: Issue Mark Duplicate
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mark-duplicate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: mark-duplicate
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'mark-duplicate'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
|
| duplicate-command | 可设置简洁命令,如:`/d` | string | ✖ |
|
||||||
|
| duplicate-labels | 为该 issue 额外增加 labels | string | ✖ |
|
||||||
|
| remove-labels | 设置可移除的 labels | string | ✖ |
|
||||||
|
| labels | 替换该 issue 的 labels | string | ✖ |
|
||||||
|
| emoji | 为该评论的增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
|
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||||
|
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||||
|
|
||||||
|
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||||
|
- `labels`:优先级最高
|
||||||
|
- `close-issue`:`true` 或 `'true'` 均可生效
|
||||||
|
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||||
|
- 团队成员若设置 `read` 权限,则为 `read`
|
||||||
|
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
||||||
|
- 普通用户为 `read` 权限
|
||||||
|
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
||||||
|
|
||||||
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
|
#### `welcome`
|
||||||
|
|
||||||
|
当一个 issue 新建时,对首次新建 issue 的用户进行欢迎。若用户非首次新建,则无操作。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Issue Welcome
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [edited]
|
types: [opened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
do-test:
|
issue-welcome:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.label.name == 'watch'
|
|
||||||
steps:
|
steps:
|
||||||
- name: find comments
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
id: fcid
|
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
body: hi @${{ github.event.issue.user.login }}, welcome!
|
||||||
comment-auth: k
|
labels: 'welcome1, welcome2'
|
||||||
body-includes: '<!-- Created by actions-cool/issues-helper -->'
|
assignees: 'xx1'
|
||||||
|
issue-emoji: '+1, -1, eyes'
|
||||||
# 输出查看找到的内容。GitHub 默认 outputs 为字符串
|
|
||||||
- run: echo find-comments ${{ steps.fcid.outputs.comments }}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: create comment
|
|
||||||
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'create-comment'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issue-number: ${{ github.event.issue.number }}
|
|
||||||
body: |
|
|
||||||
Error
|
|
||||||
<!-- Created by actions-cool/issues-helper -->
|
|
||||||
|
|
||||||
- name: update comment
|
|
||||||
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'update-comment'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
out-comments: ${{ steps.fcid.outputs.comments }}
|
|
||||||
body: |
|
|
||||||
Error Again
|
|
||||||
<!-- Created by actions-cool/issues-helper -->
|
|
||||||
update-mode: 'append'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
|
| body | 评论欢迎的内容,不填则不评论 | string | ✖ |
|
||||||
|
| emoji | 为该评论的增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
|
| labels | 为该 issue 增加 labels | string | ✖ |
|
||||||
|
| assignees | 为该 issue 增加 assignees | string | ✖ |
|
||||||
|
| issue-emoji | 为该 issue 增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
|
|
||||||
|
- 若这 4 个可选项都不填,则无操作
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
## 🎁 参 考
|
## 🎁 参 考
|
||||||
@@ -1113,14 +1103,14 @@ jobs:
|
|||||||
- `Name` 与 actions 中保持一致
|
- `Name` 与 actions 中保持一致
|
||||||
- `Value` 填写刚才个人申请的 token
|
- `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)。
|
当 actions 不填写 token 时,或填写 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)。
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
### GitHub Docs
|
### GitHub Docs
|
||||||
|
|
||||||
- [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/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
|
||||||
- [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
- [工作流触发机制](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -1128,7 +1118,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
id: createissue
|
id: createissue
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
@@ -1174,7 +1164,7 @@ x2 + y2
|
|||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
### Reactions 类型
|
### emoji 类型
|
||||||
|
|
||||||
| content | emoji |
|
| content | emoji |
|
||||||
| -- | -- |
|
| -- | -- |
|
||||||
@@ -1195,33 +1185,6 @@ x2 + y2
|
|||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
## ✨ 版本
|
|
||||||
|
|
||||||
- 版本规则
|
|
||||||
- 采用两级语义化版本,如v1、v1.1、v2、v2.1
|
|
||||||
- v1 表示初始版本
|
|
||||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
|
||||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
|
||||||
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
|
|
||||||
|
|
||||||
- 版本选择
|
|
||||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
|
||||||
- 同时也可参照下面的更新日志来选择版本
|
|
||||||
- 最新的 v1.x release 代码会合并到 1.x 分支中
|
|
||||||
- 支持直接使用分支版本。如:
|
|
||||||
|
|
||||||
```yml
|
|
||||||
- name: Issues Helper
|
|
||||||
uses: actions-cool/issues-helper@main
|
|
||||||
|
|
||||||
# or
|
|
||||||
|
|
||||||
- name: Issues Helper
|
|
||||||
uses: actions-cool/issues-helper@1.x
|
|
||||||
```
|
|
||||||
|
|
||||||
- v2 [升级参考](https://github.com/actions-cool/issues-helper/blob/fix/docs/guide/faq.md#%E4%BB%8E-v1x-%E5%8D%87%E7%BA%A7%E5%88%B0-v2%E6%9C%89%E4%BB%80%E4%B9%88%E6%B3%A8%E6%84%8F%E7%9A%84%E5%9C%B0%E6%96%B9%E5%90%97)
|
|
||||||
|
|
||||||
## Actions 模板
|
## Actions 模板
|
||||||
|
|
||||||
- 可直接使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
- 可直接使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
||||||
|
1
USERS.js
1
USERS.js
@@ -1,6 +1,7 @@
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// step1: add to end
|
// step1: add to end
|
||||||
// step2: npm run users
|
// step2: npm run users
|
||||||
|
// step3: push 3 files & open a new PR
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} url github地址
|
* @param {string} url github地址
|
||||||
|
17
action.yml
17
action.yml
@@ -28,6 +28,7 @@ inputs:
|
|||||||
description: 'Issue assignees'
|
description: 'Issue assignees'
|
||||||
random-to:
|
random-to:
|
||||||
description: 'Issue assignees random to'
|
description: 'Issue assignees random to'
|
||||||
|
|
||||||
# label
|
# label
|
||||||
labels:
|
labels:
|
||||||
description: 'Issue labels'
|
description: 'Issue labels'
|
||||||
@@ -42,20 +43,19 @@ inputs:
|
|||||||
description: 'Issue state'
|
description: 'Issue state'
|
||||||
update-mode:
|
update-mode:
|
||||||
description: 'Body update mode'
|
description: 'Body update mode'
|
||||||
contents:
|
emoji:
|
||||||
description: 'Issue reactions emoji'
|
description: 'Issue reactions emoji'
|
||||||
direction:
|
direction:
|
||||||
description: 'Find comments direction'
|
description: 'Find direction'
|
||||||
|
|
||||||
# comments
|
# comments
|
||||||
comment-auth:
|
comment-auth:
|
||||||
description: 'Find comments query auth'
|
description: 'Find comments query auth'
|
||||||
out-comments:
|
|
||||||
description: 'Find comments out comments'
|
|
||||||
assignee-includes:
|
assignee-includes:
|
||||||
description: 'Check use'
|
description: 'Check use'
|
||||||
body-includes:
|
body-includes:
|
||||||
description: 'Query use'
|
description: 'Query use'
|
||||||
|
|
||||||
# check
|
# check
|
||||||
title-excludes:
|
title-excludes:
|
||||||
description: 'Remove some to check title whether empty.'
|
description: 'Remove some to check title whether empty.'
|
||||||
@@ -79,7 +79,8 @@ inputs:
|
|||||||
description: 'Issue label set use'
|
description: 'Issue label set use'
|
||||||
exclude-labels:
|
exclude-labels:
|
||||||
description: 'Query issues exclude labels'
|
description: 'Query issues exclude labels'
|
||||||
|
assign-command:
|
||||||
|
description: 'For mark-assigness'
|
||||||
duplicate-command:
|
duplicate-command:
|
||||||
description: 'For mark-duplicate'
|
description: 'For mark-duplicate'
|
||||||
duplicate-labels:
|
duplicate-labels:
|
||||||
@@ -90,10 +91,6 @@ inputs:
|
|||||||
description: 'For remove labels'
|
description: 'For remove labels'
|
||||||
close-issue:
|
close-issue:
|
||||||
description: 'For mark-duplicate'
|
description: 'For mark-duplicate'
|
||||||
count-lables:
|
|
||||||
description: 'For month-statistics'
|
|
||||||
count-comments:
|
|
||||||
description: 'For month-statistics'
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
issue-number:
|
issue-number:
|
||||||
@@ -102,6 +99,8 @@ outputs:
|
|||||||
description: 'Create comment ID'
|
description: 'Create comment ID'
|
||||||
comments:
|
comments:
|
||||||
description: 'Find comments'
|
description: 'Find comments'
|
||||||
|
issues:
|
||||||
|
description: 'Find issues'
|
||||||
check-result:
|
check-result:
|
||||||
description: 'Check issue'
|
description: 'Check issue'
|
||||||
|
|
||||||
|
12
package.json
12
package.json
@@ -16,6 +16,7 @@
|
|||||||
"author": "xrkffgg",
|
"author": "xrkffgg",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "APP_ROOT=web dumi dev",
|
||||||
"start": "APP_ROOT=web dumi dev",
|
"start": "APP_ROOT=web dumi dev",
|
||||||
"docs:build": "APP_ROOT=web dumi build",
|
"docs:build": "APP_ROOT=web dumi build",
|
||||||
"docs-dev:build": "APP_ROOT=web UMI_ENV=dev dumi build",
|
"docs-dev:build": "APP_ROOT=web UMI_ENV=dev dumi build",
|
||||||
@@ -25,11 +26,14 @@
|
|||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --check **/*.ts",
|
||||||
"lint": "eslint src/*.ts",
|
"lint": "eslint src/*.ts",
|
||||||
"lint-fix": "eslint src/*.ts --fix",
|
"lint-fix": "eslint src/*.ts --fix",
|
||||||
|
"check-commit": "node ./scripts/check-commit.js",
|
||||||
|
"tag": "node ./scripts/tag.js",
|
||||||
|
"release": "node ./scripts/release",
|
||||||
"test": "father test",
|
"test": "father test",
|
||||||
"package": "ncc build src/main.ts -o dist",
|
"package": "ncc build src/main.ts -o dist",
|
||||||
"users": "node ./script/update-users.js",
|
"users": "node ./script/update-users.js",
|
||||||
"version": "node ./script/update-version.js",
|
"version": "node ./script/update-version.js",
|
||||||
"pub": "npm run package",
|
"pub": "sh -e ./scripts/pub.sh",
|
||||||
"all": "npm run format-check && npm run lint && npm run test && npm run package"
|
"all": "npm run format-check && npm run lint && npm run test && npm run package"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -48,12 +52,16 @@
|
|||||||
"@vercel/ncc": "^0.27.0",
|
"@vercel/ncc": "^0.27.0",
|
||||||
"common-tags": "^1.8.2",
|
"common-tags": "^1.8.2",
|
||||||
"dumi": "^1.1.26",
|
"dumi": "^1.1.26",
|
||||||
|
"chalk": "^4.1.2",
|
||||||
|
"new-github-release-url": "^1.0.0",
|
||||||
|
"open": "^7.3.0",
|
||||||
"eslint": "^7.18.0",
|
"eslint": "^7.18.0",
|
||||||
"eslint-plugin-github": "^4.1.1",
|
"eslint-plugin-github": "^4.1.1",
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"father": "^2.30.7",
|
"father": "^2.30.7",
|
||||||
"gh-pages": "^3.1.0",
|
"gh-pages": "^3.1.0",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3",
|
||||||
|
"simple-git": "^2.46.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
23
script/check-commit.js
Executable file
23
script/check-commit.js
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
const chalk = require('chalk');
|
||||||
|
const simpleGit = require('simple-git/promise');
|
||||||
|
|
||||||
|
const cwd = process.cwd();
|
||||||
|
const git = simpleGit(cwd);
|
||||||
|
|
||||||
|
async function checkCommit({ files }) {
|
||||||
|
if (files.length) {
|
||||||
|
console.log(chalk.yellow('🙄 You forgot something to commit.'));
|
||||||
|
files.forEach(({ path: filePath }) => {
|
||||||
|
console.log(' -', chalk.red(filePath));
|
||||||
|
});
|
||||||
|
console.log('');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const status = await git.status();
|
||||||
|
await checkCommit(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
14
script/pub.sh
Normal file
14
script/pub.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
echo "[TEST] check format"
|
||||||
|
npm run format-check
|
||||||
|
|
||||||
|
echo "[TEST] test package"
|
||||||
|
npm run package
|
||||||
|
|
||||||
|
echo "[TEST] test commit"
|
||||||
|
npm run check-commit
|
||||||
|
|
||||||
|
echo "[Action] do tag"
|
||||||
|
npm run tag
|
||||||
|
|
||||||
|
echo "[Action] do release"
|
||||||
|
npm run release
|
54
script/release.js
Normal file
54
script/release.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
const chalk = require('chalk');
|
||||||
|
const open = require('open');
|
||||||
|
const newGithubReleaseUrl = require('new-github-release-url');
|
||||||
|
const { readFileSync } = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
let tag = '';
|
||||||
|
|
||||||
|
const CHANGELOG_NAME = 'CHANGELOG.md';
|
||||||
|
const user = 'actions-cool';
|
||||||
|
const repo = 'issues-helper';
|
||||||
|
|
||||||
|
function getChangelog(content) {
|
||||||
|
const lines = content.split('\n');
|
||||||
|
const changeLog = [];
|
||||||
|
const pin = /^## /;
|
||||||
|
let begin = false;
|
||||||
|
for (let i = 0; i < lines.length; i += 1) {
|
||||||
|
const line = lines[i];
|
||||||
|
if (begin && pin.test(line)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (begin && line) {
|
||||||
|
changeLog.push(line);
|
||||||
|
}
|
||||||
|
if (!begin) {
|
||||||
|
begin = pin.test(line);
|
||||||
|
if (begin) {
|
||||||
|
tag = line.substring(3, line.length).trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return changeLog.join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
const changelogPath = path.join(__dirname, '..', CHANGELOG_NAME);
|
||||||
|
const changelog = readFileSync(changelogPath, 'utf-8');
|
||||||
|
|
||||||
|
const body = getChangelog(changelog);
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const url = newGithubReleaseUrl({
|
||||||
|
user,
|
||||||
|
repo,
|
||||||
|
tag,
|
||||||
|
body: body,
|
||||||
|
});
|
||||||
|
|
||||||
|
await open(url);
|
||||||
|
|
||||||
|
console.log(chalk.yellow('🚀 Please check tag and changelog. Then click publish!'));
|
||||||
|
};
|
||||||
|
|
||||||
|
run();
|
70
script/tag.js
Normal file
70
script/tag.js
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
const chalk = require('chalk');
|
||||||
|
const simpleGit = require('simple-git/promise');
|
||||||
|
const { execSync } = require('child_process');
|
||||||
|
const { readFileSync } = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const CHANGELOG_NAME = 'CHANGELOG.md';
|
||||||
|
const CHANGELOG_PATH = path.join(__dirname, '..', CHANGELOG_NAME);
|
||||||
|
const CHANGELOG = readFileSync(CHANGELOG_PATH, 'utf-8');
|
||||||
|
|
||||||
|
const cwd = process.cwd();
|
||||||
|
const git = simpleGit(cwd);
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
execSync(`git pull`);
|
||||||
|
|
||||||
|
const data = await git.tags();
|
||||||
|
const tags = data.all;
|
||||||
|
let tag = tags.reverse()[0];
|
||||||
|
console.log(chalk.green(`[Git Query] tag: ${tag}`));
|
||||||
|
|
||||||
|
const tagChangelog = getChangelogTag(CHANGELOG);
|
||||||
|
if (tagChangelog && tag != tagChangelog) {
|
||||||
|
console.log(chalk.yellow(`[Git Action] Push new ${tagChangelog} tag!`));
|
||||||
|
execSync(`git tag ${tagChangelog}`);
|
||||||
|
execSync(`git push origin ${tagChangelog}:${tagChangelog}`);
|
||||||
|
execSync(`git pull`);
|
||||||
|
tag = tagChangelog;
|
||||||
|
} else {
|
||||||
|
console.log(chalk.yellow('🙄 Please add new release changelog first.'));
|
||||||
|
console.log('');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const tagSimple = tag.startsWith('v') ? tag.substring(0, 2) : tag.substring(0, 1);
|
||||||
|
console.log(chalk.green(`[Git Query] tagSimple: ${tagSimple}`));
|
||||||
|
|
||||||
|
if (tags.includes(tagSimple)) {
|
||||||
|
console.log(chalk.yellow(`[Git Action] Delete ${tagSimple} tag`));
|
||||||
|
execSync(`git push origin :refs/tags/${tagSimple}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(chalk.yellow(`[Git Action] Add new simple ${tagSimple} tag`));
|
||||||
|
execSync(`git push origin ${tag}:${tagSimple}`);
|
||||||
|
console.log(chalk.green('🎉 Done!'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getChangelogTag(content) {
|
||||||
|
const lines = content.split('\n');
|
||||||
|
const pin = /^## /;
|
||||||
|
let begin = false;
|
||||||
|
let tag = '';
|
||||||
|
|
||||||
|
for (let i = 0; i < lines.length; i += 1) {
|
||||||
|
const line = lines[i];
|
||||||
|
if (begin && pin.test(line)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!begin) {
|
||||||
|
begin = pin.test(line);
|
||||||
|
if (begin) {
|
||||||
|
tag = line.substring(3, line.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tag.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
@@ -1,7 +1,7 @@
|
|||||||
const { readFileSync, writeFileSync } = require('fs');
|
const { readFileSync, writeFileSync } = require('fs');
|
||||||
|
|
||||||
const last = /v2\.4\.2/g;
|
const last = /@v2/g;
|
||||||
const now = `v2`;
|
const now = `@v3`;
|
||||||
|
|
||||||
let readme = readFileSync('./README.md', 'utf-8');
|
let readme = readFileSync('./README.md', 'utf-8');
|
||||||
readme = readme.replace(last, now);
|
readme = readme.replace(last, now);
|
||||||
@@ -13,32 +13,32 @@ readmeen = readmeen.replace(last, now);
|
|||||||
writeFileSync('./README.en-US.md', readmeen);
|
writeFileSync('./README.en-US.md', readmeen);
|
||||||
console.log('readmeen done!');
|
console.log('readmeen done!');
|
||||||
|
|
||||||
let index = readFileSync('./docs/index.md', 'utf-8');
|
let index = readFileSync('./web/docs/index.md', 'utf-8');
|
||||||
index = index.replace(last, now);
|
index = index.replace(last, now);
|
||||||
writeFileSync('./docs/index.md', index);
|
writeFileSync('./web/docs/index.md', index);
|
||||||
console.log('index done!');
|
console.log('index done!');
|
||||||
|
|
||||||
let indexen = readFileSync('./docs/index.en-US.md', 'utf-8');
|
let indexen = readFileSync('./web/docs/index.en-US.md', 'utf-8');
|
||||||
indexen = indexen.replace(last, now);
|
indexen = indexen.replace(last, now);
|
||||||
writeFileSync('./docs/index.en-US.md', indexen);
|
writeFileSync('./web/docs/index.en-US.md', indexen);
|
||||||
console.log('indexen done!');
|
console.log('indexen done!');
|
||||||
|
|
||||||
let base = readFileSync('./docs/base.md', 'utf-8');
|
let base = readFileSync('./web/docs/base.md', 'utf-8');
|
||||||
base = base.replace(last, now);
|
base = base.replace(last, now);
|
||||||
writeFileSync('./docs/base.md', base);
|
writeFileSync('./web/docs/base.md', base);
|
||||||
console.log('base done!');
|
console.log('base done!');
|
||||||
|
|
||||||
let baseen = readFileSync('./docs/base.en-US.md', 'utf-8');
|
let baseen = readFileSync('./web/docs/base.en-US.md', 'utf-8');
|
||||||
baseen = baseen.replace(last, now);
|
baseen = baseen.replace(last, now);
|
||||||
writeFileSync('./docs/base.en-US.md', baseen);
|
writeFileSync('./web/docs/base.en-US.md', baseen);
|
||||||
console.log('baseen done!');
|
console.log('baseen done!');
|
||||||
|
|
||||||
let adv = readFileSync('./docs/advanced.md', 'utf-8');
|
let adv = readFileSync('./web/docs/advanced.md', 'utf-8');
|
||||||
adv = adv.replace(last, now);
|
adv = adv.replace(last, now);
|
||||||
writeFileSync('./docs/advanced.md', adv);
|
writeFileSync('./web/docs/advanced.md', adv);
|
||||||
console.log('adv done!');
|
console.log('adv done!');
|
||||||
|
|
||||||
let adven = readFileSync('./docs/advanced.en-US.md', 'utf-8');
|
let adven = readFileSync('./web/docs/advanced.en-US.md', 'utf-8');
|
||||||
adven = adven.replace(last, now);
|
adven = adven.replace(last, now);
|
||||||
writeFileSync('./docs/advanced.en-US.md', adven);
|
writeFileSync('./web/docs/advanced.en-US.md', adven);
|
||||||
console.log('adven done!');
|
console.log('adven done!');
|
||||||
|
318
src/advanced.js
318
src/advanced.js
@@ -1,318 +0,0 @@
|
|||||||
const core = require('@actions/core');
|
|
||||||
const { Octokit } = require('@octokit/rest');
|
|
||||||
|
|
||||||
const {
|
|
||||||
doAddLabels,
|
|
||||||
doCreateComment,
|
|
||||||
doCloseIssue,
|
|
||||||
doLockIssue,
|
|
||||||
doCreateIssue,
|
|
||||||
} = require('./base.js');
|
|
||||||
|
|
||||||
const { doQueryIssues, getIssuesInMonth, getCreatedMonth } = require('./public.js');
|
|
||||||
|
|
||||||
const { dealStringToArr, matchKeyword, getPreMonth } = require('./util.js');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
var dayjs = require('dayjs');
|
|
||||||
var utc = require('dayjs/plugin/utc');
|
|
||||||
dayjs.extend(utc);
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
const token = core.getInput('token');
|
|
||||||
const octokit = new Octokit({ auth: `token ${token}` });
|
|
||||||
|
|
||||||
let direction = core.getInput('direction');
|
|
||||||
direction = direction === 'desc' ? 'desc' : 'asc';
|
|
||||||
const commentAuth = core.getInput('comment-auth');
|
|
||||||
const bodyIncludes = core.getInput('body-includes');
|
|
||||||
const titleIncludes = core.getInput('title-includes');
|
|
||||||
const titleRemove = core.getInput('title-excludes');
|
|
||||||
const assigneeIncludes = core.getInput('assignee-includes');
|
|
||||||
|
|
||||||
let issueState = core.getInput('issue-state') || 'open';
|
|
||||||
if (issueState != 'all' && issueState != 'closed') {
|
|
||||||
issueState = 'open';
|
|
||||||
}
|
|
||||||
|
|
||||||
const inactiveLabel = core.getInput('inactive-label') || 'inactive';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
async function doCheckInactive(owner, repo, labels) {
|
|
||||||
const issues = await doQueryIssues(owner, repo, labels, issueState);
|
|
||||||
|
|
||||||
if (issues.length) {
|
|
||||||
for (let i = 0; i < issues.length; i++) {
|
|
||||||
let arr = [];
|
|
||||||
issues[i].labels.forEach(it => {
|
|
||||||
arr.push(it.name);
|
|
||||||
});
|
|
||||||
if (!arr.includes(inactiveLabel)) {
|
|
||||||
await doAddLabels(owner, repo, issues[i].number, inactiveLabel);
|
|
||||||
if (core.getInput('body')) {
|
|
||||||
await doCreateComment(owner, repo, issues[i].number, core.getInput('body'));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`Actions: [add-inactive] issue ${issues[i].number} has label!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`Actions: [query-issues] empty!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查 issue 是否满足条件,满足返回 true
|
|
||||||
* 当前 issue 的指定人是否有一个满足 assigneeIncludes 里的某个
|
|
||||||
* 关键字匹配,是否包含前一个某个+后一个某个 '官网,网站/挂了,无法访问'
|
|
||||||
*/
|
|
||||||
async function doCheckIssue(owner, repo, issueNumber) {
|
|
||||||
let checkResult = true;
|
|
||||||
const issue = await octokit.issues.get({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!!checkResult && assigneeIncludes) {
|
|
||||||
let assigneesCheck = dealStringToArr(assigneeIncludes);
|
|
||||||
let checkAssignee = false;
|
|
||||||
issue.data.assignees.forEach(it => {
|
|
||||||
if (checkResult && !checkAssignee && assigneesCheck.includes(it.login)) {
|
|
||||||
checkResult = true;
|
|
||||||
checkAssignee = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
!checkAssignee ? (checkResult = false) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!!checkResult && titleRemove) {
|
|
||||||
const removes = dealStringToArr(titleRemove);
|
|
||||||
let t = issue.data.title;
|
|
||||||
removes.forEach(re => {
|
|
||||||
t = t.replace(re, '');
|
|
||||||
});
|
|
||||||
if (t.trim().length == 0) {
|
|
||||||
checkResult = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!!checkResult && titleIncludes) {
|
|
||||||
const titleArr = titleIncludes.split('/');
|
|
||||||
const keyword1 = dealStringToArr(titleArr[0]);
|
|
||||||
const keyword2 = dealStringToArr(titleArr[1]);
|
|
||||||
checkResult = keyword2.length
|
|
||||||
? matchKeyword(issue.data.title, keyword1) && matchKeyword(issue.data.title, keyword2)
|
|
||||||
: matchKeyword(issue.data.title, keyword1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!!checkResult && bodyIncludes) {
|
|
||||||
const bodyArr = bodyIncludes.split('/');
|
|
||||||
const keyword1 = dealStringToArr(bodyArr[0]);
|
|
||||||
const keyword2 = dealStringToArr(bodyArr[1]);
|
|
||||||
checkResult = keyword2.length
|
|
||||||
? matchKeyword(issue.data.body, keyword1) && matchKeyword(issue.data.body, keyword2)
|
|
||||||
: matchKeyword(issue.data.body, keyword1);
|
|
||||||
}
|
|
||||||
core.info(`Actions: [check-issue][${!!checkResult}] success!`);
|
|
||||||
core.setOutput('check-result', !!checkResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCloseIssues(owner, repo, labels) {
|
|
||||||
const issues = await doQueryIssues(owner, repo, labels, 'open');
|
|
||||||
|
|
||||||
if (issues.length) {
|
|
||||||
for (let i = 0; i < issues.length; i++) {
|
|
||||||
await doCloseIssue(owner, repo, issues[i].number);
|
|
||||||
if (core.getInput('body')) {
|
|
||||||
await doCreateComment(owner, repo, issues[i].number, core.getInput('body'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`Actions: [query-issues] empty!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doFindComments(owner, repo, issueNumber) {
|
|
||||||
const commentList = await listComments(owner, repo, issueNumber);
|
|
||||||
core.info(`Actions: [find-comments][${issueNumber}] success!`);
|
|
||||||
let comments = [];
|
|
||||||
commentList.forEach(item => {
|
|
||||||
const a = commentAuth ? item.user.login === commentAuth : true;
|
|
||||||
const b = bodyIncludes ? item.body.includes(bodyIncludes) : true;
|
|
||||||
if (a && b) {
|
|
||||||
comments.push({
|
|
||||||
id: item.id,
|
|
||||||
auth: item.user.login,
|
|
||||||
body: item.body,
|
|
||||||
created: item.created_at,
|
|
||||||
updated: item.updated_at,
|
|
||||||
});
|
|
||||||
if (direction === 'desc') {
|
|
||||||
comments.reverse();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
core.setOutput('comments', comments);
|
|
||||||
core.info(`out-comments: ${JSON.stringify(comments)}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function listComments(owner, repo, issueNumber, page = 1) {
|
|
||||||
let { data: comments } = await octokit.issues.listComments({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
per_page: 100,
|
|
||||||
page,
|
|
||||||
});
|
|
||||||
if (comments.length >= 100) {
|
|
||||||
comments = comments.concat(await listComments(page + 1));
|
|
||||||
}
|
|
||||||
return comments;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doLockIssues(owner, repo, labels) {
|
|
||||||
const issues = await doQueryIssues(owner, repo, labels, issueState);
|
|
||||||
|
|
||||||
if (issues.length) {
|
|
||||||
for (let i = 0; i < issues.length; i++) {
|
|
||||||
await doLockIssue(owner, repo, issues[i].number);
|
|
||||||
if (core.getInput('body')) {
|
|
||||||
await doCreateComment(owner, repo, issues[i].number, core.getInput('body'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`Actions: [query-issues] empty!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doMonthStatistics(owner, repo, labels, assignees) {
|
|
||||||
const countLables = core.getInput('count-lables');
|
|
||||||
const countComments = core.getInput('count-comments');
|
|
||||||
|
|
||||||
const thisMonth = dayjs.utc().month() + 1;
|
|
||||||
const year = thisMonth == 1 ? dayjs.utc().year() - 1 : dayjs.utc().year();
|
|
||||||
|
|
||||||
const month = getPreMonth(thisMonth);
|
|
||||||
const showMonth = month < 10 ? `0${month}` : month;
|
|
||||||
|
|
||||||
let issues = await getIssuesInMonth(owner, repo, thisMonth);
|
|
||||||
if (issues.length == 0) {
|
|
||||||
core.info(`Actions: [query-issues-${month}] empty!`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
issues = issues.filter(i => {
|
|
||||||
return getCreatedMonth(i.created_at) == month;
|
|
||||||
});
|
|
||||||
let total = issues.length;
|
|
||||||
let totalIssues = [...issues];
|
|
||||||
let openTotal = 0;
|
|
||||||
let openIssuesNumber = [];
|
|
||||||
let closeTotal = 0;
|
|
||||||
let closeIssuesNumber = [];
|
|
||||||
let labelsTotals = [];
|
|
||||||
const title = `[${owner}/${repo}] Month Statistics: ${year}-${showMonth}`;
|
|
||||||
for (let i = 0; i < issues.length; i++) {
|
|
||||||
if (issues[i].state == 'closed') {
|
|
||||||
closeTotal += 1;
|
|
||||||
closeIssuesNumber.push(issues[i].number);
|
|
||||||
} else if (issues[i].state == 'open') {
|
|
||||||
openTotal += 1;
|
|
||||||
openIssuesNumber.push(issues[i].number);
|
|
||||||
}
|
|
||||||
if (countLables && issues[i].labels) {
|
|
||||||
issues[i].labels.forEach(l => {
|
|
||||||
if (l.name in labelsTotals) {
|
|
||||||
labelsTotals[l.name] += 1;
|
|
||||||
} else {
|
|
||||||
labelsTotals[l.name] = 1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let now = dayjs().utc().format('YYYY-MM-DD HH:mm:ss');
|
|
||||||
let body = `
|
|
||||||
- Created time: ${now}
|
|
||||||
|
|
||||||
- Time base: UTC +0
|
|
||||||
`;
|
|
||||||
let totalShow = `
|
|
||||||
### Count
|
|
||||||
|
|
||||||
| Total | Open | Closed |
|
|
||||||
| -- | -- | -- |
|
|
||||||
| ${total} | ${openTotal} | ${closeTotal} |
|
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
body += totalShow;
|
|
||||||
|
|
||||||
if (countLables == 'true') {
|
|
||||||
let labelsArr = [];
|
|
||||||
for (var lab in labelsTotals) {
|
|
||||||
labelsArr.push({
|
|
||||||
labelName: lab,
|
|
||||||
number: labelsTotals[lab],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
labelsArr.sort((a, b) => b.number - a.number);
|
|
||||||
let labelsTitle = `
|
|
||||||
### Labels statistics
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Number</th>
|
|
||||||
</tr>`;
|
|
||||||
let labelsBody = '';
|
|
||||||
labelsArr.forEach(it => {
|
|
||||||
labelsBody += `<tr><td>${it.labelName}</td><td>${it.number}</td></tr>`;
|
|
||||||
});
|
|
||||||
body =
|
|
||||||
body +
|
|
||||||
labelsTitle +
|
|
||||||
labelsBody +
|
|
||||||
`</table>
|
|
||||||
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (countComments == 'true') {
|
|
||||||
totalIssues.sort((a, b) => b.comments - a.comments);
|
|
||||||
const maxComments = totalIssues.slice(0, 3);
|
|
||||||
let commentTitle = `
|
|
||||||
### Most comments
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>#</th>
|
|
||||||
<th>Issue</th>
|
|
||||||
<th>Title</th>
|
|
||||||
<th>Number</th>
|
|
||||||
<th>State</th>
|
|
||||||
</tr>
|
|
||||||
`;
|
|
||||||
let commentBody = '';
|
|
||||||
maxComments.forEach((it, ind) => {
|
|
||||||
commentBody += `<tr>
|
|
||||||
<td>${ind + 1}</td>
|
|
||||||
<td>${it.number}</td>
|
|
||||||
<td>${it.title}</td>
|
|
||||||
<td>${it.comments}</td>
|
|
||||||
<td>${it.state}</td></tr>`;
|
|
||||||
});
|
|
||||||
body = body + commentTitle + commentBody + '</table>';
|
|
||||||
}
|
|
||||||
|
|
||||||
await doCreateIssue(owner, repo, title, body, labels, assignees);
|
|
||||||
}
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
module.exports = {
|
|
||||||
doCheckInactive,
|
|
||||||
doCheckIssue,
|
|
||||||
doCloseIssues,
|
|
||||||
doFindComments,
|
|
||||||
doLockIssues,
|
|
||||||
doMonthStatistics,
|
|
||||||
};
|
|
533
src/base.js
533
src/base.js
@@ -1,533 +0,0 @@
|
|||||||
const core = require('@actions/core');
|
|
||||||
const github = require('@actions/github');
|
|
||||||
const { Octokit } = require('@octokit/rest');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
const ALLREACTIONS = ['+1', '-1', 'laugh', 'confused', 'heart', 'hooray', 'rocket', 'eyes'];
|
|
||||||
|
|
||||||
const { doQueryIssues } = require('./public.js');
|
|
||||||
|
|
||||||
const {
|
|
||||||
dealStringToArr,
|
|
||||||
dealRandomAssignees,
|
|
||||||
testDuplicate,
|
|
||||||
checkPermission,
|
|
||||||
} = require('./util.js');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
const token = core.getInput('token');
|
|
||||||
const octokit = new Octokit({ auth: `token ${token}` });
|
|
||||||
const context = github.context;
|
|
||||||
|
|
||||||
const contents = core.getInput('contents');
|
|
||||||
|
|
||||||
const randomTo = core.getInput('random-to');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
async function doAddAssignees(owner, repo, issueNumber, assignees) {
|
|
||||||
const arr = dealRandomAssignees(assignees, randomTo);
|
|
||||||
await octokit.issues.addAssignees({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
assignees: arr,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [add-assignees][${arr}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doAddLabels(owner, repo, issueNumber, labels) {
|
|
||||||
await octokit.issues.addLabels({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
labels: dealStringToArr(labels),
|
|
||||||
});
|
|
||||||
core.info(`Actions: [add-labels][${labels}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCloseIssue(owner, repo, issueNumber) {
|
|
||||||
await octokit.issues.update({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
state: 'closed',
|
|
||||||
});
|
|
||||||
core.info(`Actions: [close-issue][${issueNumber}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCreateComment(owner, repo, issueNumber, body) {
|
|
||||||
const { data } = await octokit.issues.createComment({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
body,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [create-comment][${body}] success!`);
|
|
||||||
core.setOutput('comment-id', data.id);
|
|
||||||
|
|
||||||
if (contents) {
|
|
||||||
await doCreateCommentContent(owner, repo, data.id, dealStringToArr(contents));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCreateCommentContent(owner, repo, commentId, contents) {
|
|
||||||
if (contents.length) {
|
|
||||||
contents.forEach(async item => {
|
|
||||||
if (testContent(item)) {
|
|
||||||
await octokit.reactions.createForIssueComment({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
comment_id: commentId,
|
|
||||||
content: item,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [create-reactions][${item}] success!`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCreateIssue(owner, repo, title, body, labels, assignees) {
|
|
||||||
let params = {
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
title,
|
|
||||||
body,
|
|
||||||
labels: dealStringToArr(labels),
|
|
||||||
assignees: dealRandomAssignees(assignees, randomTo),
|
|
||||||
};
|
|
||||||
|
|
||||||
const { data } = await octokit.issues.create(params);
|
|
||||||
core.info(`Actions: [create-issue][${title}] success!`);
|
|
||||||
core.setOutput('issue-number', data.number);
|
|
||||||
|
|
||||||
if (contents) {
|
|
||||||
await doCreateIssueContent(owner, repo, data.number, dealStringToArr(contents));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCreateIssueContent(owner, repo, issueNumber, contents) {
|
|
||||||
if (contents.length) {
|
|
||||||
contents.forEach(async item => {
|
|
||||||
if (testContent(item)) {
|
|
||||||
await octokit.reactions.createForIssue({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
content: item,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [create-reactions][${item}] success!`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doCreateLabel(owner, repo) {
|
|
||||||
const name = core.getInput('label-name');
|
|
||||||
const color = core.getInput('label-color') || 'ededed';
|
|
||||||
const description = core.getInput('label-desc') || '';
|
|
||||||
|
|
||||||
if (!name) {
|
|
||||||
core.setFailed(`This actions should input 'label-name'!`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
await octokit.issues.createLabel({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
name,
|
|
||||||
color,
|
|
||||||
description,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [create-label][${name}] success!`);
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doDeleteComment(owner, repo, commentId) {
|
|
||||||
let id = commentId;
|
|
||||||
|
|
||||||
const outComments = core.getInput('out-comments');
|
|
||||||
if (outComments) {
|
|
||||||
const outCommentsArr = JSON.parse(outComments);
|
|
||||||
core.info(`Actions: [out-comments-length][${outCommentsArr.length}] success!`);
|
|
||||||
outCommentsArr.forEach(async item => {
|
|
||||||
await doDelet(item.id);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await doDelet(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doDelet(id) {
|
|
||||||
await octokit.issues.deleteComment({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
comment_id: id,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [delete-comment][${id}] success!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doLockIssue(owner, repo, issueNumber) {
|
|
||||||
const lockReason = core.getInput('lock-reason');
|
|
||||||
let params = {
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
};
|
|
||||||
const reasons = ['off-topic', 'too heated', 'resolved', 'spam'];
|
|
||||||
if (lockReason && reasons.includes(lockReason)) {
|
|
||||||
params.lock_reason = lockReason;
|
|
||||||
}
|
|
||||||
await octokit.issues.lock(params);
|
|
||||||
core.info(`Actions: [lock-issue][${issueNumber}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doMarkDuplicate(owner, repo, labels) {
|
|
||||||
if (context.eventName != 'issue_comment') {
|
|
||||||
core.info(`This actions only support on 'issue_comment'!`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.payload.action == 'created' || context.payload.action == 'edited') {
|
|
||||||
const duplicateCommand = core.getInput('duplicate-command');
|
|
||||||
const duplicateLabels = core.getInput('duplicate-labels');
|
|
||||||
const removeLables = core.getInput('remove-labels');
|
|
||||||
const closeIssue = core.getInput('close-issue');
|
|
||||||
const requirePermission = core.getInput('require-permission') || 'write';
|
|
||||||
|
|
||||||
const commentId = context.payload.comment.id;
|
|
||||||
const commentBody = context.payload.comment.body;
|
|
||||||
const commentUser = context.payload.comment.user.login;
|
|
||||||
const issueNumber = context.payload.issue.number;
|
|
||||||
|
|
||||||
const ifCommandInput = !!duplicateCommand;
|
|
||||||
|
|
||||||
if (
|
|
||||||
!commentBody.includes('?') &&
|
|
||||||
((ifCommandInput &&
|
|
||||||
commentBody.startsWith(duplicateCommand) &&
|
|
||||||
commentBody.split(' ')[0] == duplicateCommand) ||
|
|
||||||
testDuplicate(commentBody))
|
|
||||||
) {
|
|
||||||
try {
|
|
||||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
username: commentUser,
|
|
||||||
});
|
|
||||||
const { permission } = res.data;
|
|
||||||
if (!checkPermission(requirePermission, permission)) {
|
|
||||||
core.info(`The user ${commentUser} is not allow!`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ifCommandInput) {
|
|
||||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
|
||||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
|
||||||
} else if (contents) {
|
|
||||||
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
|
||||||
}
|
|
||||||
|
|
||||||
const issue = await octokit.issues.get({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
let newLabels = [];
|
|
||||||
if (issue.data.labels.length > 0) {
|
|
||||||
newLabels = issue.data.labels
|
|
||||||
.map(({ name }) => name)
|
|
||||||
.filter(name => !dealStringToArr(removeLables).includes(name));
|
|
||||||
}
|
|
||||||
if (duplicateLabels) {
|
|
||||||
newLabels = [...newLabels, ...dealStringToArr(duplicateLabels)];
|
|
||||||
}
|
|
||||||
if (labels) {
|
|
||||||
newLabels = dealStringToArr(labels);
|
|
||||||
}
|
|
||||||
if (newLabels.length > 0) {
|
|
||||||
await doSetLabels(owner, repo, issueNumber, newLabels.toString());
|
|
||||||
core.info(`Actions: [mark-duplicate-labels][${newLabels}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (closeIssue == 'true') {
|
|
||||||
await doCloseIssue(owner, repo, issueNumber);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
core.info(error.message);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(
|
|
||||||
`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`This actions only support on 'issue_comment' created or edited!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doOpenIssue(owner, repo, issueNumber) {
|
|
||||||
await octokit.issues.update({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
state: 'open',
|
|
||||||
});
|
|
||||||
core.info(`Actions: [open-issue][${issueNumber}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doRemoveAssignees(owner, repo, issueNumber, assignees) {
|
|
||||||
await octokit.issues.removeAssignees({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
assignees: dealStringToArr(assignees),
|
|
||||||
});
|
|
||||||
core.info(`Actions: [remove-assignees][${assignees}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doRemoveLabels(owner, repo, issueNumber, labels) {
|
|
||||||
const issue = await octokit.issues.get({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
|
|
||||||
const baseLabels = issue.data.labels.map(({ name }) => name);
|
|
||||||
const removeLabels = baseLabels.filter(name => dealStringToArr(labels).includes(name));
|
|
||||||
|
|
||||||
core.info(`Actions: [filter-labels][${removeLabels.join(',')}] success!`);
|
|
||||||
|
|
||||||
for (const label of removeLabels) {
|
|
||||||
await octokit.issues.removeLabel({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
name: label,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [remove-label][${label}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info(`Actions: [remove-labels][${labels}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doSetLabels(owner, repo, issueNumber, labels) {
|
|
||||||
// 概率性出现问题:https://github.com/octokit/rest.js/issues/1982,规避 setLabels
|
|
||||||
if (labels) {
|
|
||||||
// await octokit.issues.setLabels({
|
|
||||||
// owner,
|
|
||||||
// repo,
|
|
||||||
// issue_number: issueNumber,
|
|
||||||
// labels: dealStringToArr(labels)
|
|
||||||
// });
|
|
||||||
const issue = await octokit.issues.get({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
const baseLabels = issue.data.labels.map(({ name }) => name);
|
|
||||||
const removeLabels = baseLabels.filter(name => !dealStringToArr(labels).includes(name));
|
|
||||||
const addLabels = dealStringToArr(labels).filter(name => !baseLabels.includes(name));
|
|
||||||
|
|
||||||
if (removeLabels.length > 0) {
|
|
||||||
await doRemoveLabels(owner, repo, issueNumber, removeLabels.toString());
|
|
||||||
core.info(`Actions: [set-labels-remove][${removeLabels}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addLabels.length > 0) {
|
|
||||||
await doAddLabels(owner, repo, issueNumber, addLabels.toString());
|
|
||||||
core.info(`Actions: [set-labels-add][${addLabels}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info(`Actions: [set-labels][${labels}] success!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doUnlockIssue(owner, repo, issueNumber) {
|
|
||||||
await octokit.issues.unlock({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [unlock-issue][${issueNumber}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doUpdateComment(owner, repo, commentId, body, updateMode, ifUpdateBody) {
|
|
||||||
let id = commentId;
|
|
||||||
|
|
||||||
const outComments = core.getInput('out-comments');
|
|
||||||
if (outComments) {
|
|
||||||
const outCommentsArr = JSON.parse(outComments);
|
|
||||||
core.info(`Actions: [out-comments-length][${outCommentsArr.length}] success!`);
|
|
||||||
outCommentsArr.forEach(async item => {
|
|
||||||
await doComment(item.id);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await doComment(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doComment(id) {
|
|
||||||
const comment = await octokit.issues.getComment({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
comment_id: id,
|
|
||||||
});
|
|
||||||
const comment_body = comment.data.body;
|
|
||||||
|
|
||||||
let params = {
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
comment_id: id,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (core.getInput('body') || ifUpdateBody) {
|
|
||||||
if (updateMode === 'append') {
|
|
||||||
params.body = `${comment_body}\n${body}`;
|
|
||||||
} else {
|
|
||||||
params.body = body;
|
|
||||||
}
|
|
||||||
|
|
||||||
await octokit.issues.updateComment(params);
|
|
||||||
core.info(`Actions: [update-comment][${id}] success!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (contents) {
|
|
||||||
await doCreateCommentContent(owner, repo, id, dealStringToArr(contents));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doUpdateIssue(
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issueNumber,
|
|
||||||
state,
|
|
||||||
title,
|
|
||||||
body,
|
|
||||||
updateMode,
|
|
||||||
assignees,
|
|
||||||
labels,
|
|
||||||
) {
|
|
||||||
const issue = await octokit.issues.get({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
const issue_body = issue.data.body;
|
|
||||||
const issue_title = issue.data.title;
|
|
||||||
|
|
||||||
let issue_labels = [];
|
|
||||||
if (issue.data.labels.length > 0) {
|
|
||||||
issue.data.labels.forEach(it => {
|
|
||||||
issue_labels.push(it.name);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
let issue_assignees = [];
|
|
||||||
if (issue.data.assignees.length > 0) {
|
|
||||||
issue.data.assignees.forEach(it => {
|
|
||||||
issue_assignees.push(it.login);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
let params = {
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
state,
|
|
||||||
};
|
|
||||||
|
|
||||||
params.title = core.getInput('title') ? title : issue_title;
|
|
||||||
|
|
||||||
let next_body;
|
|
||||||
if (core.getInput('body')) {
|
|
||||||
if (updateMode === 'append') {
|
|
||||||
next_body = `${issue_body}\n${body}`;
|
|
||||||
} else {
|
|
||||||
next_body = body;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
next_body = issue_body;
|
|
||||||
}
|
|
||||||
params.body = next_body;
|
|
||||||
|
|
||||||
params.labels = labels ? dealStringToArr(labels) : issue_labels;
|
|
||||||
params.assignees = assignees ? dealStringToArr(assignees) : issue_assignees;
|
|
||||||
|
|
||||||
await octokit.issues.update(params);
|
|
||||||
core.info(`Actions: [update-issue][${issueNumber}] success!`);
|
|
||||||
|
|
||||||
if (contents) {
|
|
||||||
await doCreateIssueContent(owner, repo, issueNumber, contents);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doWelcome(owner, repo, assignees, labels, body) {
|
|
||||||
const context = github.context;
|
|
||||||
const isIssue = !!context.payload.issue;
|
|
||||||
const issueContents = core.getInput('issue-contents');
|
|
||||||
if (!isIssue) {
|
|
||||||
core.setFailed('The event that triggered this action must be a issue. Error!');
|
|
||||||
} else {
|
|
||||||
const auth = context.payload.sender.login;
|
|
||||||
core.info(`Actions: [welcome: auth=][${auth}]`);
|
|
||||||
const issueNumber = context.issue.number;
|
|
||||||
const issues = await doQueryIssues(owner, repo, false, 'all', auth);
|
|
||||||
if (issues.length == 0 || (issues.length == 1 && issues[0].number == issueNumber)) {
|
|
||||||
if (core.getInput('body')) {
|
|
||||||
await doCreateComment(owner, repo, issueNumber, body);
|
|
||||||
} else {
|
|
||||||
core.info(`Actions: [welcome] no body!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (assignees) {
|
|
||||||
await doAddAssignees(owner, repo, issueNumber, assignees);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (labels) {
|
|
||||||
await doAddLabels(owner, repo, issueNumber, labels);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (issueContents) {
|
|
||||||
await doCreateIssueContent(owner, repo, issueNumber, dealStringToArr(issueContents));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`Actions: [welcome][${auth}] is not first time!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
function testContent(con) {
|
|
||||||
if (ALLREACTIONS.includes(con)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
core.setFailed('This actions not supported!');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
module.exports = {
|
|
||||||
doAddAssignees,
|
|
||||||
doAddLabels,
|
|
||||||
doCloseIssue,
|
|
||||||
doCreateComment,
|
|
||||||
doCreateCommentContent,
|
|
||||||
doCreateIssue,
|
|
||||||
doCreateIssueContent,
|
|
||||||
doCreateLabel,
|
|
||||||
doDeleteComment,
|
|
||||||
doMarkDuplicate,
|
|
||||||
doLockIssue,
|
|
||||||
doOpenIssue,
|
|
||||||
doRemoveAssignees,
|
|
||||||
doRemoveLabels,
|
|
||||||
doSetLabels,
|
|
||||||
doUnlockIssue,
|
|
||||||
doUpdateComment,
|
|
||||||
doUpdateIssue,
|
|
||||||
doWelcome,
|
|
||||||
};
|
|
217
src/main.js
217
src/main.js
@@ -1,217 +0,0 @@
|
|||||||
const core = require('@actions/core');
|
|
||||||
const github = require('@actions/github');
|
|
||||||
const { THANKS } = require('actions-util/lib/thanks');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
const {
|
|
||||||
doAddAssignees,
|
|
||||||
doAddLabels,
|
|
||||||
doCloseIssue,
|
|
||||||
doCreateComment,
|
|
||||||
doCreateIssue,
|
|
||||||
doCreateLabel,
|
|
||||||
doDeleteComment,
|
|
||||||
doMarkDuplicate,
|
|
||||||
doLockIssue,
|
|
||||||
doOpenIssue,
|
|
||||||
doRemoveAssignees,
|
|
||||||
doRemoveLabels,
|
|
||||||
doSetLabels,
|
|
||||||
doUnlockIssue,
|
|
||||||
doUpdateComment,
|
|
||||||
doUpdateIssue,
|
|
||||||
doWelcome,
|
|
||||||
} = require('./base.js');
|
|
||||||
|
|
||||||
const {
|
|
||||||
doCheckInactive,
|
|
||||||
doCheckIssue,
|
|
||||||
doCloseIssues,
|
|
||||||
doFindComments,
|
|
||||||
doLockIssues,
|
|
||||||
doMonthStatistics,
|
|
||||||
} = require('./advanced.js');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
const ALLACTIONS = [
|
|
||||||
// base
|
|
||||||
'add-assignees',
|
|
||||||
'add-labels',
|
|
||||||
'close-issue',
|
|
||||||
'create-comment',
|
|
||||||
'create-issue',
|
|
||||||
'create-label',
|
|
||||||
'delete-comment',
|
|
||||||
'lock-issue',
|
|
||||||
'mark-duplicate',
|
|
||||||
'open-issue',
|
|
||||||
'remove-assignees',
|
|
||||||
'remove-labels',
|
|
||||||
'set-labels',
|
|
||||||
'unlock-issue',
|
|
||||||
'update-comment',
|
|
||||||
'update-issue',
|
|
||||||
'welcome',
|
|
||||||
|
|
||||||
// advanced
|
|
||||||
'check-inactive',
|
|
||||||
'check-issue',
|
|
||||||
'close-issues',
|
|
||||||
'find-comments',
|
|
||||||
'lock-issues',
|
|
||||||
'month-statistics',
|
|
||||||
];
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
async function main() {
|
|
||||||
try {
|
|
||||||
const ctx = github.context;
|
|
||||||
|
|
||||||
// No display to outside
|
|
||||||
let owner, repo;
|
|
||||||
if (core.getInput('repo')) {
|
|
||||||
owner = core.getInput('repo').split('/')[0];
|
|
||||||
repo = core.getInput('repo').split('/')[1];
|
|
||||||
} else {
|
|
||||||
owner = ctx.repo.owner;
|
|
||||||
repo = ctx.repo.repo;
|
|
||||||
}
|
|
||||||
|
|
||||||
let defaultNo;
|
|
||||||
if (ctx.eventName === 'issues' || ctx.eventName === 'issue_comment') {
|
|
||||||
defaultNo = ctx.payload.issue.number;
|
|
||||||
}
|
|
||||||
|
|
||||||
const issueNumber = core.getInput('issue-number') || defaultNo;
|
|
||||||
const commentId = core.getInput('comment-id');
|
|
||||||
|
|
||||||
const defaultBody = `Currently at ${owner}/${repo}. And this is default comment.`;
|
|
||||||
const body = core.getInput('body') || defaultBody;
|
|
||||||
|
|
||||||
const defaultTitle = `Default Title`;
|
|
||||||
const title = core.getInput('title') || defaultTitle;
|
|
||||||
|
|
||||||
const assignees = core.getInput('assignees');
|
|
||||||
|
|
||||||
const labels = core.getInput('labels');
|
|
||||||
const state = core.getInput('state') || 'open';
|
|
||||||
|
|
||||||
let updateMode = core.getInput('update-mode');
|
|
||||||
if (updateMode !== 'append') {
|
|
||||||
updateMode = 'replace';
|
|
||||||
}
|
|
||||||
|
|
||||||
// actions
|
|
||||||
const actions = core.getInput('actions', { required: true });
|
|
||||||
|
|
||||||
const actionsArr = actions.split(',');
|
|
||||||
for (const action of actionsArr) {
|
|
||||||
await testActions(action.trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
async function testActions(action) {
|
|
||||||
if (ALLACTIONS.includes(action)) {
|
|
||||||
await choseActions(action);
|
|
||||||
} else {
|
|
||||||
core.setFailed(`Actions: [${action}] is not supported!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function choseActions(action) {
|
|
||||||
switch (action) {
|
|
||||||
// base
|
|
||||||
case 'add-assignees':
|
|
||||||
await doAddAssignees(owner, repo, issueNumber, assignees);
|
|
||||||
break;
|
|
||||||
case 'add-labels':
|
|
||||||
await doAddLabels(owner, repo, issueNumber, labels);
|
|
||||||
break;
|
|
||||||
case 'close-issue':
|
|
||||||
await doCloseIssue(owner, repo, issueNumber);
|
|
||||||
break;
|
|
||||||
case 'create-comment':
|
|
||||||
await doCreateComment(owner, repo, issueNumber, body);
|
|
||||||
break;
|
|
||||||
case 'create-issue':
|
|
||||||
await doCreateIssue(owner, repo, title, body, labels, assignees);
|
|
||||||
break;
|
|
||||||
case 'create-label':
|
|
||||||
await doCreateLabel(owner, repo);
|
|
||||||
break;
|
|
||||||
case 'delete-comment':
|
|
||||||
await doDeleteComment(owner, repo, commentId);
|
|
||||||
break;
|
|
||||||
case 'lock-issue':
|
|
||||||
await doLockIssue(owner, repo, issueNumber);
|
|
||||||
break;
|
|
||||||
case 'mark-duplicate':
|
|
||||||
await doMarkDuplicate(owner, repo, labels);
|
|
||||||
break;
|
|
||||||
case 'open-issue':
|
|
||||||
await doOpenIssue(owner, repo, issueNumber);
|
|
||||||
break;
|
|
||||||
case 'remove-assignees':
|
|
||||||
await doRemoveAssignees(owner, repo, issueNumber, assignees);
|
|
||||||
break;
|
|
||||||
case 'remove-labels':
|
|
||||||
await doRemoveLabels(owner, repo, issueNumber, labels);
|
|
||||||
break;
|
|
||||||
case 'set-labels':
|
|
||||||
await doSetLabels(owner, repo, issueNumber, labels);
|
|
||||||
break;
|
|
||||||
case 'unlock-issue':
|
|
||||||
await doUnlockIssue(owner, repo, issueNumber);
|
|
||||||
break;
|
|
||||||
case 'update-comment':
|
|
||||||
await doUpdateComment(owner, repo, commentId, body, updateMode);
|
|
||||||
break;
|
|
||||||
case 'update-issue':
|
|
||||||
await doUpdateIssue(
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issueNumber,
|
|
||||||
state,
|
|
||||||
title,
|
|
||||||
body,
|
|
||||||
updateMode,
|
|
||||||
assignees,
|
|
||||||
labels,
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'welcome':
|
|
||||||
await doWelcome(owner, repo, assignees, labels, body);
|
|
||||||
break;
|
|
||||||
|
|
||||||
// advanced
|
|
||||||
case 'check-inactive':
|
|
||||||
await doCheckInactive(owner, repo, labels);
|
|
||||||
break;
|
|
||||||
case 'check-issue':
|
|
||||||
await doCheckIssue(owner, repo, issueNumber);
|
|
||||||
break;
|
|
||||||
case 'close-issues':
|
|
||||||
await doCloseIssues(owner, repo, labels);
|
|
||||||
break;
|
|
||||||
case 'find-comments':
|
|
||||||
await doFindComments(owner, repo, issueNumber);
|
|
||||||
break;
|
|
||||||
case 'lock-issues':
|
|
||||||
await doLockIssues(owner, repo, labels);
|
|
||||||
break;
|
|
||||||
case 'month-statistics':
|
|
||||||
await doMonthStatistics(owner, repo, labels, assignees);
|
|
||||||
break;
|
|
||||||
// default
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info('\n' + THANKS);
|
|
||||||
} catch (error) {
|
|
||||||
core.setFailed(error.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
main();
|
|
@@ -1,6 +1,7 @@
|
|||||||
import * as github from '@actions/github';
|
|
||||||
import { dealStringToArr, THANKS } from 'actions-util';
|
import { dealStringToArr, THANKS } from 'actions-util';
|
||||||
|
|
||||||
|
import * as github from '@actions/github';
|
||||||
|
|
||||||
import * as core from './core';
|
import * as core from './core';
|
||||||
import { IssueHelperEngine } from './helper';
|
import { IssueHelperEngine } from './helper';
|
||||||
import type { TAction } from './types';
|
import type { TAction } from './types';
|
||||||
|
139
src/public.js
139
src/public.js
@@ -1,139 +0,0 @@
|
|||||||
const core = require('@actions/core');
|
|
||||||
const { Octokit } = require('@octokit/rest');
|
|
||||||
|
|
||||||
const { getPreMonth, dealStringToArr } = require('./util.js');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
var dayjs = require('dayjs');
|
|
||||||
var utc = require('dayjs/plugin/utc');
|
|
||||||
dayjs.extend(utc);
|
|
||||||
var isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
|
|
||||||
dayjs.extend(isSameOrBefore);
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
const token = core.getInput('token');
|
|
||||||
const octokit = new Octokit({ auth: `token ${token}` });
|
|
||||||
|
|
||||||
const perPage = 100;
|
|
||||||
|
|
||||||
const issueCreator = core.getInput('issue-creator');
|
|
||||||
const issueAssignee = core.getInput('issue-assignee');
|
|
||||||
const issueMentioned = core.getInput('issue-mentioned');
|
|
||||||
|
|
||||||
const bodyIncludes = core.getInput('body-includes');
|
|
||||||
const titleIncludes = core.getInput('title-includes');
|
|
||||||
|
|
||||||
const excludeLabels = core.getInput('exclude-labels');
|
|
||||||
|
|
||||||
const inactiveDay = core.getInput('inactive-day');
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
/**
|
|
||||||
* 查询 Issues 列表
|
|
||||||
* @param {*} owner
|
|
||||||
* @param {*} repo
|
|
||||||
* @param {*} labels
|
|
||||||
* @param {*} state
|
|
||||||
* @param {*} creator
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
async function doQueryIssues(owner, repo, labels, state, creator) {
|
|
||||||
let params = {
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
state,
|
|
||||||
};
|
|
||||||
|
|
||||||
issueCreator ? (params.creator = issueCreator) : null;
|
|
||||||
issueAssignee ? (params.assignee = issueAssignee) : null;
|
|
||||||
issueMentioned ? (params.mentioned = issueMentioned) : null;
|
|
||||||
|
|
||||||
if (labels) {
|
|
||||||
params.labels = labels;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (creator) {
|
|
||||||
params.creator = creator;
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await getIssues(params);
|
|
||||||
let issues = [];
|
|
||||||
let issueNumbers = [];
|
|
||||||
if (res.length) {
|
|
||||||
const excludeLabelsArr = dealStringToArr(excludeLabels);
|
|
||||||
res.forEach(iss => {
|
|
||||||
const a = bodyIncludes ? iss.body.includes(bodyIncludes) : true;
|
|
||||||
const b = titleIncludes ? iss.title.includes(titleIncludes) : true;
|
|
||||||
/**
|
|
||||||
* Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request.
|
|
||||||
* For this reason, "Issues" endpoints may return both issues and pull requests in the response.
|
|
||||||
* You can identify pull requests by the pull_request key.
|
|
||||||
*/
|
|
||||||
if (a && b && iss.pull_request === undefined) {
|
|
||||||
if (excludeLabelsArr.length) {
|
|
||||||
for (let i = 0; i < iss.labels.length; i += 1) {
|
|
||||||
if (excludeLabelsArr.includes(iss.labels[i].name)) return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inactiveDay) {
|
|
||||||
let lastTime = dayjs.utc().subtract(Number(inactiveDay), 'day');
|
|
||||||
let updateTime = dayjs.utc(iss.updated_at);
|
|
||||||
if (updateTime.isSameOrBefore(lastTime)) {
|
|
||||||
issues.push(iss);
|
|
||||||
issueNumbers.push(iss.number);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
issues.push(iss);
|
|
||||||
issueNumbers.push(iss.number);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
core.info(`Actions: [query-issues]: [${JSON.stringify(issueNumbers)}]!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return issues;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getIssues(params, page = 1) {
|
|
||||||
let { data: issues } = await octokit.issues.listForRepo({
|
|
||||||
...params,
|
|
||||||
per_page: perPage,
|
|
||||||
page,
|
|
||||||
});
|
|
||||||
if (issues.length >= perPage) {
|
|
||||||
issues = issues.concat(await getIssues(params, page + 1));
|
|
||||||
}
|
|
||||||
return issues;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getIssuesInMonth(owner, repo, thisMonth, page = 1) {
|
|
||||||
const month = getPreMonth(thisMonth);
|
|
||||||
let { data: issues } = await octokit.issues.listForRepo({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
state: 'all',
|
|
||||||
per_page: perPage,
|
|
||||||
page,
|
|
||||||
});
|
|
||||||
issues = issues.filter(i => {
|
|
||||||
return i.pull_request === undefined;
|
|
||||||
});
|
|
||||||
if (issues.length && getCreatedMonth(issues[issues.length - 1].created_at) >= month) {
|
|
||||||
issues = issues.concat(await getIssuesInMonth(owner, repo, thisMonth, page + 1));
|
|
||||||
}
|
|
||||||
return issues;
|
|
||||||
}
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
function getCreatedMonth(d) {
|
|
||||||
return dayjs(d).utc().month() + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
module.exports = {
|
|
||||||
doQueryIssues,
|
|
||||||
getIssues,
|
|
||||||
getIssuesInMonth,
|
|
||||||
getCreatedMonth,
|
|
||||||
};
|
|
@@ -54,4 +54,4 @@ export type TAction =
|
|||||||
| 'mark-assignees'
|
| 'mark-assignees'
|
||||||
| 'mark-duplicate'
|
| 'mark-duplicate'
|
||||||
| 'welcome';
|
| 'welcome';
|
||||||
// [ Advanced End ]
|
//// [ Advanced End ]
|
||||||
|
@@ -3,11 +3,13 @@ import { defineConfig } from 'dumi';
|
|||||||
|
|
||||||
const name = 'issues-helper';
|
const name = 'issues-helper';
|
||||||
|
|
||||||
|
const logo = 'https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: 'Issues Helper',
|
title: 'Issues Helper',
|
||||||
mode: 'site',
|
mode: 'site',
|
||||||
favicon: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
|
favicon: logo,
|
||||||
logo: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
|
logo,
|
||||||
exportStatic: {},
|
exportStatic: {},
|
||||||
ssr: {},
|
ssr: {},
|
||||||
outputPath: '../docs-dist',
|
outputPath: '../docs-dist',
|
||||||
@@ -30,7 +32,6 @@ export default defineConfig({
|
|||||||
{ title: '基 础', path: '/base' },
|
{ title: '基 础', path: '/base' },
|
||||||
{ title: '进 阶', path: '/advanced' },
|
{ title: '进 阶', path: '/advanced' },
|
||||||
{ title: '更新日志', path: '/changelog' },
|
{ title: '更新日志', path: '/changelog' },
|
||||||
{ title: '国内镜像', path: 'https://issues-helper.gitee.io' },
|
|
||||||
{ title: 'GitHub', path: 'https://github.com/actions-cool/issues-helper' },
|
{ title: 'GitHub', path: 'https://github.com/actions-cool/issues-helper' },
|
||||||
],
|
],
|
||||||
'en-US': [
|
'en-US': [
|
||||||
|
@@ -1,4 +1,2 @@
|
|||||||
// For dumi style
|
// For dumi style
|
||||||
import './less/dumi.less';
|
import './web.less';
|
||||||
import './less/main.less';
|
|
||||||
import './less/markdown.less';
|
|
||||||
|
@@ -22,17 +22,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
inactive-day: 30
|
inactive-day: 30
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||||
| labels | Labels filtering | string | ✖ |
|
| labels | Labels filtering | string | ✖ |
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -83,10 +83,10 @@ jobs:
|
|||||||
title-includes: 'x1,x2/y1,y2'
|
title-includes: 'x1,x2/y1,y2'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignee-includes | Assignees contains check | string | ✖ |
|
| assignee-includes | Assignees contains check | string | ✖ |
|
||||||
| title-includes | Title contains check | string | ✖ |
|
| title-includes | Title contains check | string | ✖ |
|
||||||
@@ -112,7 +112,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -120,10 +120,10 @@ jobs:
|
|||||||
inactive-day: 7
|
inactive-day: 7
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||||
| labels | Labels filtering | string | ✖ |
|
| labels | Labels filtering | string | ✖ |
|
||||||
@@ -145,7 +145,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -154,10 +154,10 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
body-includes: 'this'
|
body-includes: 'this'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
||||||
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
||||||
@@ -172,6 +172,45 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
|
||||||
|
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
||||||
|
### `find-issues`
|
||||||
|
|
||||||
|
Find the current repository, the creator is k , the title contains `this` , the body contains `that`, and the list of issues in the open state.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Find issues
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'find-issues'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-creator: 'k'
|
||||||
|
issue-state: 'open'
|
||||||
|
title-includes: 'this'
|
||||||
|
body-includes: 'that'
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
|
| issue-state | State filtering | string | ✖ |
|
||||||
|
| issue-creator | Creator filtering | string | ✖ |
|
||||||
|
| title-includes | Title filtering | string | ✖ |
|
||||||
|
| body-includes | Body filtering | string | ✖ |
|
||||||
|
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||||
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
|
| direction | Return sort | string | ✖ |
|
||||||
|
|
||||||
|
- Returns `issues` in the following format:
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', created: '', updated: ''},
|
||||||
|
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', created: '', updated: ''},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
|
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
|
||||||
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
||||||
|
|
||||||
@@ -191,7 +230,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -199,10 +238,10 @@ jobs:
|
|||||||
inactive-day: 128
|
inactive-day: 128
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||||
| labels | Labels filtering | string | ✖ |
|
| labels | Labels filtering | string | ✖ |
|
||||||
@@ -221,42 +260,126 @@ jobs:
|
|||||||
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
|
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
|
||||||
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
|
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
|
||||||
|
|
||||||
## `month-statistics`
|
## `mark-assignees`
|
||||||
|
|
||||||
At 1 o'clock on the 1st of each month, an issue is generated for the statistics of the previous month.
|
Quickly assign person, only for the issue to add editor comments.
|
||||||
|
|
||||||
```
|
```yml
|
||||||
name: Issue Month Statistics
|
name: Issue Mark Assignees
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
issue_comment:
|
||||||
- cron: "0 1 1 * *"
|
types: [created, edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
month-statistics:
|
mark-duplicate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'mark-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
count-lables: 'true'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| labels | The labels for the new issue | string | ✖ |
|
| assign-command | Simple commands can be set, such as: `/a` | string | ✖ |
|
||||||
| assignees | The assignees for the new issue | string | ✖ |
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||||
| count-lables | Whether the new issue count labels | string | ✖ |
|
|
||||||
| count-comments | Whether the new issue count comments | string | ✖ |
|
|
||||||
|
|
||||||
- The new issue title defaults to `[Current repo] Month Statistics: Year-Month`
|
- `assign-command`: default `/assign`
|
||||||
- `count-lables`: You can set `'true'` to add labels statistics
|
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
||||||
- `count-comments`: You can set `'true'` to add comments statistics
|
- If the team member sets the `read` permission, it is `read`
|
||||||
|
- If the external Collaborator is set to `read` permission, it is `read`
|
||||||
|
- Ordinary users have `read` permission
|
||||||
|
- When set `write`, `admin` and `write` meet the conditions
|
||||||
|
|
||||||
As follows:
|
## `mark-duplicate`
|
||||||
|
|
||||||

|
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Issue Mark Duplicate
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mark-duplicate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: mark-duplicate
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'mark-duplicate'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
|
| duplicate-command | Simple commands can be set, such as: `/d` | string | ✖ |
|
||||||
|
| duplicate-labels | Add additional labels to this issue | string | ✖ |
|
||||||
|
| remove-labels | Set removable labels | string | ✖ |
|
||||||
|
| labels | Replace the labels of the issue | string | ✖ |
|
||||||
|
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) for this comment | string | ✖ |
|
||||||
|
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||||
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||||
|
|
||||||
|
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||||
|
- `labels`: Highest priority
|
||||||
|
- `close-issue`: Both `true` or `'true'` can take effect
|
||||||
|
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
||||||
|
- If the team member sets the `read` permission, it is `read`
|
||||||
|
- If the external Collaborator is set to `read` permission, it is `read`
|
||||||
|
- Ordinary users have `read` permission
|
||||||
|
- When set `write`, `admin` and `write` meet the conditions
|
||||||
|
|
||||||
|
<Alert>
|
||||||
|
Note: Duplicate created with the concise command does not display the content of the red box in the figure below. But in fact this has no effect.
|
||||||
|
</Alert>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## `welcome`
|
||||||
|
|
||||||
|
When an issue is created, the user who created the issue for the first time is welcome.
|
||||||
|
|
||||||
|
If the user is not creating for the first time, there is no operation.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Issue Welcome
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue-welcome:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: welcome
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'welcome'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
body: hi @${{ github.event.issue.user.login }}, welcome!
|
||||||
|
labels: 'welcome1, welcome2'
|
||||||
|
assignees: 'xx1'
|
||||||
|
issue-emoji: '+1, -1, eyes'
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
|
| body | Comment on the welcome content, no comment if you leave it blank | string | ✖ |
|
||||||
|
| labels | Add labels to this issue | string | ✖ |
|
||||||
|
| assignees | Add assignees to this issue | string | ✖ |
|
||||||
|
| issue-emoji | Add [emoji](/en-US/guide/ref#-emoji-type) to this issue| string | ✖ |
|
||||||
|
|
||||||
|
- If these 4 options are not filled, no operation
|
||||||
|
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -32,9 +32,9 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||||
| contents | 为该评论增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 为该评论增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
| labels | 标签筛选 | string | ✖ |
|
| labels | 标签筛选 | string | ✖ |
|
||||||
| issue-state | 状态筛选 | string | ✖ |
|
| issue-state | 状态筛选 | string | ✖ |
|
||||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||||
| title-includes | 标题包含校验 | string | ✖ |
|
| title-includes | 标题包含校验 | string | ✖ |
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -119,9 +119,9 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||||
| contents | 为该评论增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 为该评论增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
| labels | 标签筛选 | string | ✖ |
|
| labels | 标签筛选 | string | ✖ |
|
||||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||||
| issue-creator | 创建人筛选 | string | ✖ |
|
| issue-creator | 创建人筛选 | string | ✖ |
|
||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -153,7 +153,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
||||||
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
||||||
@@ -171,6 +171,46 @@ jobs:
|
|||||||
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||||
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||||
|
|
||||||
|
## `find-issues`
|
||||||
|
|
||||||
|
查找当前仓库,创建者是 k ,title 包含 `this` ,body 包含 `that`,打开状态的 issues 列表。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Find issues
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'find-issues'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-creator: 'k'
|
||||||
|
issue-state: 'open'
|
||||||
|
title-includes: 'this'
|
||||||
|
body-includes: 'that'
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
|
| issue-state | 状态筛选 | string | ✖ |
|
||||||
|
| issue-creator | 创建者筛选 | string | ✖ |
|
||||||
|
| title-includes | 标题包含过滤,不填时无校验 | string | ✖ |
|
||||||
|
| body-includes | 内容包含过滤,不填时无校验 | string | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
|
| direction | 返回 `issues` 排序 | string | ✖ |
|
||||||
|
|
||||||
|
- 返回 `issues`,格式如下:
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', created: '', updated: ''},
|
||||||
|
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', created: '', updated: ''},
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||||
|
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||||
|
|
||||||
## `lock-issues`
|
## `lock-issues`
|
||||||
|
|
||||||
每 3 个月 1 号 UTC 0 时,锁定已填加 `inactive` label 且 128 天以上未活跃的所有 issues。
|
每 3 个月 1 号 UTC 0 时,锁定已填加 `inactive` label 且 128 天以上未活跃的所有 issues。
|
||||||
@@ -187,7 +227,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -198,9 +238,9 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||||
| contents | 为该评论增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 为该评论增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
| labels | 标签筛选 | string | ✖ |
|
| labels | 标签筛选 | string | ✖ |
|
||||||
| issue-state | 状态筛选 | string | ✖ |
|
| issue-state | 状态筛选 | string | ✖ |
|
||||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||||
@@ -217,42 +257,124 @@ jobs:
|
|||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
|
|
||||||
## `month-statistics`
|
## `mark-assignees`
|
||||||
|
|
||||||
每月 1 号 1 时,生成一个 issue 上月统计。
|
快捷加指定人,仅作用于 issue 新增编辑评论。
|
||||||
|
|
||||||
```
|
```yml
|
||||||
name: Issue Month Statistics
|
name: Issue Mark Assignees
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
issue_comment:
|
||||||
- cron: "0 1 1 * *"
|
types: [created, edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
month-statistics:
|
mark-duplicate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'mark-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
count-lables: 'true'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
| assign-command | 可设置简洁命令,如:`/a` | string | ✖ |
|
||||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||||
| count-lables | 新增 issue 是否统计 labels | string | ✖ |
|
|
||||||
| count-comments | 新增 issue 是否统计 comments | string | ✖ |
|
|
||||||
|
|
||||||
- 新增 `issue` 的标题默认为 `[当前仓库] Month Statistics: 年-月`
|
- `assign-command`:可设置简洁命令。默认:`/assign`
|
||||||
- `count-lables`:可设置 `'true'`,增加 labels 统计
|
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||||
- `count-comments`:可设置 `'true'`,增加 comments 统计
|
- 团队成员若设置 `read` 权限,则为 `read`
|
||||||
|
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
||||||
|
- 普通用户为 `read` 权限
|
||||||
|
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
||||||
|
|
||||||
如下所示:
|
## `mark-duplicate`
|
||||||
|
|
||||||

|
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Issue Mark Duplicate
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mark-duplicate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: mark-duplicate
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'mark-duplicate'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
|
| duplicate-command | 可设置简洁命令,如:`/d` | string | ✖ |
|
||||||
|
| duplicate-labels | 为该 issue 额外增加 labels | string | ✖ |
|
||||||
|
| remove-labels | 设置可移除的 labels | string | ✖ |
|
||||||
|
| labels | 替换该 issue 的 labels | string | ✖ |
|
||||||
|
| emoji | 为该评论的增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
|
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||||
|
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||||
|
|
||||||
|
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||||
|
- `labels`:优先级最高
|
||||||
|
- `close-issue`:`true` 或 `'true'` 均可生效
|
||||||
|
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||||
|
- 团队成员若设置 `read` 权限,则为 `read`
|
||||||
|
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
||||||
|
- 普通用户为 `read` 权限
|
||||||
|
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
||||||
|
|
||||||
|
<Alert>
|
||||||
|
注意:使用简洁命令创建的 Duplicate 不显示下图红框内容。但其实这个没有任何影响的。
|
||||||
|
</Alert>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## `welcome`
|
||||||
|
|
||||||
|
当一个 issue 新建时,对首次新建 issue 的用户进行欢迎。若用户非首次新建,则无操作。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Issue Welcome
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue-welcome:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: welcome
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'welcome'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
body: hi @${{ github.event.issue.user.login }}, welcome!
|
||||||
|
labels: 'welcome1, welcome2'
|
||||||
|
assignees: 'xx1'
|
||||||
|
issue-emoji: '+1, -1, eyes'
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
|
| body | 评论欢迎的内容,不填则不评论 | string | ✖ |
|
||||||
|
| labels | 为该 issue 增加 labels | string | ✖ |
|
||||||
|
| assignees | 为该 issue 增加 assignees | string | ✖ |
|
||||||
|
| issue-emoji | 为该 issue 增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
|
|
||||||
|
- 若这 4 个可选项都不填,则无操作
|
||||||
|
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -31,10 +31,10 @@ jobs:
|
|||||||
random-to: 1
|
random-to: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
||||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||||
@@ -44,6 +44,7 @@ jobs:
|
|||||||
- [Reference to on](/en-US/guide/ref#-github-docs)
|
- [Reference to on](/en-US/guide/ref#-github-docs)
|
||||||
- `${{ github.event.issue.number }}` is the current issue. [More references](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
|
- `${{ github.event.issue.number }}` is the current issue. [More references](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
|
||||||
- `assignees` support multiple and separated by comma
|
- `assignees` support multiple and separated by comma
|
||||||
|
- You can assign up to 10 people to each issue
|
||||||
|
|
||||||
## `add-labels`
|
## `add-labels`
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -70,10 +71,10 @@ jobs:
|
|||||||
labels: 'bug' or 'xx1,xx2'
|
labels: 'bug' or 'xx1,xx2'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
||||||
|
|
||||||
@@ -85,17 +86,17 @@ Close the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
## `create-comment`
|
## `create-comment`
|
||||||
@@ -115,7 +116,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -124,22 +125,21 @@ jobs:
|
|||||||
Hello @${{ github.event.issue.user.login }}. Add some comments.
|
Hello @${{ github.event.issue.user.login }}. Add some comments.
|
||||||
|
|
||||||
你好 @${{ github.event.issue.user.login }}。巴拉巴拉。
|
你好 @${{ github.event.issue.user.login }}。巴拉巴拉。
|
||||||
contents: '+1' or '+1,heart'
|
emoji: '+1' or '+1,heart'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| body | Add comment content | string | ✖ |
|
| body | Add comment content | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
|
||||||
|
|
||||||
- `body` default is `Currently at ${owner}/${repo}. And this is default comment.`
|
- No action when `body` is empty
|
||||||
- Where `${owner}/${repo}` means the current repo
|
|
||||||
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](/en-US/guide/ref#-outputs-use)
|
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](/en-US/guide/ref#-outputs-use)
|
||||||
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
||||||
- `contents` support multiple and separated by comma
|
- `emoji` support multiple and separated by comma
|
||||||
|
|
||||||
## `create-issue`
|
## `create-issue`
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -165,19 +165,19 @@ jobs:
|
|||||||
body: 'xxxx'
|
body: 'xxxx'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| title | The title of the new issue | string | ✖ |
|
| title | The title of the new issue | string | ✖ |
|
||||||
| body | The body of the new issue | string | ✖ |
|
| body | The body of the new issue | string | ✖ |
|
||||||
| labels | The labels for the new issue | string | ✖ |
|
| labels | The labels for the new issue | string | ✖ |
|
||||||
| assignees | The assignees for the new issue | string | ✖ |
|
| assignees | The assignees for the new issue | string | ✖ |
|
||||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
|
||||||
|
|
||||||
- `title` default is `Default Title`
|
- `title` default is `Default Title`
|
||||||
- Return `issue-number`. [Usage reference](/en-US/guide/ref#-outputs-use)
|
- Return `issue-number`. [Usage reference](/en-US/guide/ref#-outputs-use)
|
||||||
@@ -188,7 +188,7 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create label
|
- name: Create label
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-label'
|
actions: 'create-label'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -197,10 +197,10 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
|
|||||||
label-desc: 'xx'
|
label-desc: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| label-name | Label name, emoji support | string | ✔ |
|
| label-name | Label name, emoji support | string | ✔ |
|
||||||
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||||
| label-desc | Label description | string | ✖ |
|
| label-desc | Label description | string | ✖ |
|
||||||
@@ -214,21 +214,18 @@ According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified c
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: xxx
|
comment-id: xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
|
||||||
|
|
||||||
- When `out-comments` is entered, `comment-id` does not work
|
|
||||||
|
|
||||||
## `lock-issue`
|
## `lock-issue`
|
||||||
|
|
||||||
@@ -247,88 +244,39 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| lock-reason | Reason for locking issue | string | ✖ |
|
| lock-reason | Reason for locking issue | string | ✖ |
|
||||||
|
|
||||||
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
||||||
|
|
||||||
## `mark-duplicate`
|
|
||||||
|
|
||||||
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Mark Duplicate
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created, edited]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
mark-duplicate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: mark-duplicate
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'mark-duplicate'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
```
|
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | Action type | string | ✔ |
|
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
|
||||||
| duplicate-command | Simple commands can be set, such as: `/d` | string | ✖ |
|
|
||||||
| duplicate-labels | Add additional labels to this issue | string | ✖ |
|
|
||||||
| remove-labels | Set removable labels | string | ✖ |
|
|
||||||
| labels | Replace the labels of the issue | string | ✖ |
|
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
|
||||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
|
||||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
|
||||||
|
|
||||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
|
||||||
- `labels`: Highest priority
|
|
||||||
- `close-issue`: Both `true` or `'true'` can take effect
|
|
||||||
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
|
||||||
- If the team member sets the `read` permission, it is `read`
|
|
||||||
- If the external Collaborator is set to `read` permission, it is `read`
|
|
||||||
- Ordinary users have `read` permission
|
|
||||||
- When set `write`, `admin` and `write` meet the conditions
|
|
||||||
|
|
||||||
<Alert>
|
|
||||||
Note: Duplicate created with the concise command does not display the content of the red box in the figure below. But in fact this has no effect.
|
|
||||||
</Alert>
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## `open-issue`
|
## `open-issue`
|
||||||
|
|
||||||
Open the specified issue.
|
Open the specified issue.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
## `remove-assignees`
|
## `remove-assignees`
|
||||||
@@ -337,7 +285,7 @@ Remove the person designated by issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -345,10 +293,10 @@ Remove the person designated by issue.
|
|||||||
assignees: 'xx'
|
assignees: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
||||||
|
|
||||||
@@ -358,7 +306,7 @@ Remove the specified labels.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -366,10 +314,10 @@ Remove the specified labels.
|
|||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
||||||
|
|
||||||
@@ -381,7 +329,7 @@ Replace the labels of issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -389,10 +337,10 @@ Replace the labels of issue.
|
|||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
||||||
|
|
||||||
@@ -402,17 +350,17 @@ Unlock the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
## `update-comment`
|
## `update-comment`
|
||||||
@@ -433,23 +381,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: ${{ github.event.comment.id }}
|
comment-id: ${{ github.event.comment.id }}
|
||||||
contents: 'eyes'
|
emoji: 'eyes'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||||
| body | Update the content of comment | string | ✖ |
|
| body | Update the content of comment | string | ✖ |
|
||||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
|
||||||
|
|
||||||
- When `body` is not entered, it will remain as it is
|
- When `body` is not entered, it will remain as it is
|
||||||
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
||||||
@@ -461,7 +409,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -472,13 +420,13 @@ Update the specified issue according to the `issue-number`.
|
|||||||
update-mode: 'replace'
|
update-mode: 'replace'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
||||||
| title | Modify the title of the issue | string | ✖ |
|
| title | Modify the title of the issue | string | ✖ |
|
||||||
@@ -486,46 +434,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||||
| labels | Replace the labels of issue | string | ✖ |
|
| labels | Replace the labels of issue | string | ✖ |
|
||||||
| assignees | Replace the assignees of issue | string | ✖ |
|
| assignees | Replace the assignees of issue | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
|
||||||
|
|
||||||
- `state` defaults to `open`
|
- `state` defaults to `open`
|
||||||
- When the option is not filled, it will keep the original
|
- When the option is not filled, it will keep the original
|
||||||
|
|
||||||
## `welcome`
|
|
||||||
|
|
||||||
When an issue is created, the user who created the issue for the first time is welcome.
|
|
||||||
|
|
||||||
If the user is not creating for the first time, there is no operation.
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Welcome
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [opened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
issue-welcome:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: welcome
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'welcome'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
body: hi @${{ github.event.issue.user.login }}, welcome!
|
|
||||||
labels: 'welcome1, welcome2'
|
|
||||||
assignees: 'xx1'
|
|
||||||
issue-contents: '+1, -1, eyes'
|
|
||||||
```
|
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | Action type | string | ✔ |
|
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
|
||||||
| body | Comment on the welcome content, no comment if you leave it blank | string | ✖ |
|
|
||||||
| labels | Add labels to this issue | string | ✖ |
|
|
||||||
| assignees | Add assignees to this issue | string | ✖ |
|
|
||||||
| issue-contents | Add [reaction](/en-US/guide/ref#-reactions-type) to this issue| string | ✖ |
|
|
||||||
|
|
||||||
- If these 4 options are not filled, no operation
|
|
172
web/docs/base.md
172
web/docs/base.md
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
@@ -44,6 +44,7 @@ jobs:
|
|||||||
- [on 参考](/guide/ref#-github-相关文档)
|
- [on 参考](/guide/ref#-github-相关文档)
|
||||||
- `${{ 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)
|
||||||
- `assignees` 支持多个,需用逗号隔开
|
- `assignees` 支持多个,需用逗号隔开
|
||||||
|
- assign 最多只能设定 10 个
|
||||||
|
|
||||||
## `add-labels`
|
## `add-labels`
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -73,7 +74,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -95,7 +96,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
## `create-comment`
|
## `create-comment`
|
||||||
@@ -115,7 +116,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -124,22 +125,21 @@ jobs:
|
|||||||
Hello ${{ github.event.issue.user.login }}. Add some comments.
|
Hello ${{ github.event.issue.user.login }}. Add some comments.
|
||||||
|
|
||||||
你好 ${{ github.event.issue.user.login }}。巴拉巴拉。
|
你好 ${{ github.event.issue.user.login }}。巴拉巴拉。
|
||||||
contents: '+1' or '+1,heart'
|
emoji: '+1' or '+1,heart'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| body | 新增评论的内容 | string | ✖ |
|
| body | 新增评论的内容 | string | ✖ |
|
||||||
| contents | 为新增评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 为新增评论的增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
|
|
||||||
- `body` 默认为:`Currently at ${owner}/${repo}. And this is default comment.`
|
- `body` 为空时,无操作
|
||||||
- 其中 `${owner}/${repo}` 表示当前仓库
|
|
||||||
- 返回 `comment-id`,可用于之后操作。[用法参考](/guide/ref#-outputs-使用)
|
- 返回 `comment-id`,可用于之后操作。[用法参考](/guide/ref#-outputs-使用)
|
||||||
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
|
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
|
||||||
- `contents` 支持多个,需用逗号隔开
|
- `emoji` 支持多个,需用逗号隔开
|
||||||
|
|
||||||
## `create-issue`
|
## `create-issue`
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -165,19 +165,19 @@ jobs:
|
|||||||
body: 'xxxx'
|
body: 'xxxx'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| title | 新增 issue 的标题 | string | ✖ |
|
| title | 新增 issue 的标题 | string | ✖ |
|
||||||
| body | 新增 issue 的内容 | string | ✖ |
|
| body | 新增 issue 的内容 | string | ✖ |
|
||||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
| contents | 为新增 issue 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 为新增 issue 增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
|
|
||||||
- `title` 默认为:`Default Title`
|
- `title` 默认为:`Default Title`
|
||||||
- 返回 `issue-number`,[用法参考](/guide/ref#-outputs-使用)
|
- 返回 `issue-number`,[用法参考](/guide/ref#-outputs-使用)
|
||||||
@@ -188,7 +188,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create label
|
- name: Create label
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-label'
|
actions: 'create-label'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -200,7 +200,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| label-name | 标签名称,支持 emoji | string | ✔ |
|
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||||
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||||
| label-desc | 标签描述 | string | ✖ |
|
| label-desc | 标签描述 | string | ✖ |
|
||||||
@@ -214,7 +214,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -224,11 +224,8 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
|
||||||
|
|
||||||
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
|
||||||
|
|
||||||
## `lock-issue`
|
## `lock-issue`
|
||||||
|
|
||||||
@@ -247,7 +244,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -257,68 +254,19 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||||
|
|
||||||
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
||||||
|
|
||||||
## `mark-duplicate`
|
|
||||||
|
|
||||||
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Mark Duplicate
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created, edited]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
mark-duplicate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: mark-duplicate
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'mark-duplicate'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
```
|
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | 操作类型 | string | ✔ |
|
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
|
||||||
| duplicate-command | 可设置简洁命令,如:`/d` | string | ✖ |
|
|
||||||
| duplicate-labels | 为该 issue 额外增加 labels | string | ✖ |
|
|
||||||
| remove-labels | 设置可移除的 labels | string | ✖ |
|
|
||||||
| labels | 替换该 issue 的 labels | string | ✖ |
|
|
||||||
| contents | 为该评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
|
||||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
|
||||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
|
||||||
|
|
||||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
|
||||||
- `labels`:优先级最高
|
|
||||||
- `close-issue`:`true` 或 `'true'` 均可生效
|
|
||||||
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
|
||||||
- 团队成员若设置 `read` 权限,则为 `read`
|
|
||||||
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
|
||||||
- 普通用户为 `read` 权限
|
|
||||||
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
|
||||||
|
|
||||||
<Alert>
|
|
||||||
注意:使用简洁命令创建的 Duplicate 不显示下图红框内容。但其实这个没有任何影响的。
|
|
||||||
</Alert>
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## `open-issue`
|
## `open-issue`
|
||||||
|
|
||||||
打开指定 issue。
|
打开指定 issue。
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -328,7 +276,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
## `remove-assignees`
|
## `remove-assignees`
|
||||||
@@ -337,7 +285,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -348,7 +296,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
@@ -358,7 +306,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -369,7 +317,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
@@ -381,7 +329,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -392,7 +340,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
||||||
|
|
||||||
@@ -402,7 +350,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -412,7 +360,7 @@ jobs:
|
|||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
## `update-comment`
|
## `update-comment`
|
||||||
@@ -433,23 +381,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: ${{ github.event.comment.id }}
|
comment-id: ${{ github.event.comment.id }}
|
||||||
contents: 'eyes'
|
emoji: 'eyes'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
||||||
| body | 更新 comment 的内容 | string | ✖ |
|
| body | 更新 comment 的内容 | string | ✖ |
|
||||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||||
| contents | 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
|
|
||||||
- `body` 不填时,会保持原有
|
- `body` 不填时,会保持原有
|
||||||
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
||||||
@@ -461,7 +409,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -472,13 +420,13 @@ jobs:
|
|||||||
update-mode: 'replace'
|
update-mode: 'replace'
|
||||||
labels: 'xx'
|
labels: 'xx'
|
||||||
assignees: 'xxx'
|
assignees: 'xxx'
|
||||||
contents: '+1'
|
emoji: '+1'
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
||||||
| title | 修改 issue 的标题 | string | ✖ |
|
| title | 修改 issue 的标题 | string | ✖ |
|
||||||
@@ -486,45 +434,7 @@ jobs:
|
|||||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||||
| labels | 替换 issue 的 labels | string | ✖ |
|
| labels | 替换 issue 的 labels | string | ✖ |
|
||||||
| assignees | 替换 issue 的 assignees | string | ✖ |
|
| assignees | 替换 issue 的 assignees | string | ✖ |
|
||||||
| contents | 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| emoji | 增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
|
|
||||||
- `state` 默认为 `open`
|
- `state` 默认为 `open`
|
||||||
- 当可选项不填时,会保持原有
|
- 当可选项不填时,会保持原有
|
||||||
|
|
||||||
|
|
||||||
## `welcome`
|
|
||||||
|
|
||||||
当一个 issue 新建时,对首次新建 issue 的用户进行欢迎。若用户非首次新建,则无操作。
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Issue Welcome
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [opened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
issue-welcome:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: welcome
|
|
||||||
uses: actions-cool/issues-helper@v2
|
|
||||||
with:
|
|
||||||
actions: 'welcome'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
body: hi @${{ github.event.issue.user.login }}, welcome!
|
|
||||||
labels: 'welcome1, welcome2'
|
|
||||||
assignees: 'xx1'
|
|
||||||
issue-contents: '+1, -1, eyes'
|
|
||||||
```
|
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
|
||||||
| -- | -- | -- | -- |
|
|
||||||
| actions | 操作类型 | string | ✔ |
|
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
|
||||||
| body | 评论欢迎的内容,不填则不评论 | string | ✖ |
|
|
||||||
| labels | 为该 issue 增加 labels | string | ✖ |
|
|
||||||
| assignees | 为该 issue 增加 assignees | string | ✖ |
|
|
||||||
| issue-contents | 为该 issue 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
|
||||||
|
|
||||||
- 若这 4 个可选项都不填,则无操作
|
|
@@ -4,35 +4,7 @@ toc: menu
|
|||||||
|
|
||||||
# ✨ Changelog
|
# ✨ Changelog
|
||||||
|
|
||||||
- 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
|
|
||||||
```
|
|
||||||
|
|
||||||
- v2 [upgrade reference](/en-US/guide/faq)
|
- v2 [upgrade reference](/en-US/guide/faq)
|
||||||
|
- v3 [changelog](/en-US/guide/faq#v3-changelog)
|
||||||
|
|
||||||
<embed src="../../CHANGELOG.md"></embed>
|
<embed src="../../CHANGELOG.md"></embed>
|
||||||
|
@@ -4,35 +4,7 @@ toc: menu
|
|||||||
|
|
||||||
# ✨ 更新日志
|
# ✨ 更新日志
|
||||||
|
|
||||||
- 版本规则
|
|
||||||
- 采用两级语义化版本,如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@v2
|
|
||||||
```
|
|
||||||
|
|
||||||
- v2 [升级参考](/guide/faq)
|
- v2 [升级参考](/guide/faq)
|
||||||
|
- v3 [变更](/guide/faq/#v3-变更)
|
||||||
|
|
||||||
<embed src="../../CHANGELOG.md"></embed>
|
<embed src="../../CHANGELOG.md"></embed>
|
||||||
|
@@ -26,10 +26,62 @@ Yes, you can directly modify `actions`. For example: `actions:'create-comment'`
|
|||||||
|
|
||||||
You can view the detailed [changelog](/en-US/changelog). The latest releases version is recommended.
|
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?
|
## 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`.
|
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`
|
||||||
|
- deleteComment updateComment no longer supports `out-comments`, keeping pure functionality
|
||||||
|
- Remove title body default
|
||||||
|
- `month-statistics` is removed, can use [issues-month-statistics](https://github.com/actions-cool/issues-month-statistics)
|
||||||
|
|
||||||
## What should I do if there is no function I want here?
|
## 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).
|
You can submit it in [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18).
|
||||||
|
@@ -26,10 +26,62 @@ GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有
|
|||||||
|
|
||||||
你可以查看详细的 [更新日志](/changelog)。推荐采用最新 releases 版本。
|
你可以查看详细的 [更新日志](/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.x 升级到 v2,有什么注意的地方吗?
|
||||||
|
|
||||||
v1.12 和 v2.0.0 版本的差别只有一处。即 `mark-duplicate` 中的 `require-permission` 增加了默认值 `write`。
|
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
|
||||||
|
- deleteComment updateComment 不再支持 `out-comments`,保持纯粹功能
|
||||||
|
- 移除 title body 默认值
|
||||||
|
- `month-statistics` 移除,可使用 [issues-month-statistics](https://github.com/actions-cool/issues-month-statistics)
|
||||||
|
|
||||||
## 如果这里没有我想要的功能,该怎么办?
|
## 如果这里没有我想要的功能,该怎么办?
|
||||||
|
|
||||||
你可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
|
你可以在 issues 中提出。
|
||||||
|
@@ -44,6 +44,7 @@ ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trig
|
|||||||
|
|
||||||
- The owner or collaborator of the warehouse, if there is an organization, including members
|
- The owner or collaborator of the warehouse, if there is an organization, including members
|
||||||
- Participants of the issue, including creators and commenters
|
- Participants of the issue, including creators and commenters
|
||||||
|
- Max 10
|
||||||
|
|
||||||
## Benchmark
|
## Benchmark
|
||||||
|
|
||||||
|
@@ -45,6 +45,7 @@ ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trig
|
|||||||
|
|
||||||
- 仓库的所有者或协作者,若有组织,包括成员
|
- 仓库的所有者或协作者,若有组织,包括成员
|
||||||
- issue 的参与者,包括创建者、评论者
|
- issue 的参与者,包括创建者、评论者
|
||||||
|
- 最多支持 10 个
|
||||||
|
|
||||||
## 运行基准
|
## 运行基准
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ x2 + y2
|
|||||||
"x1" false
|
"x1" false
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📍 `Reactions` Type
|
## 📍 `emoji` Type
|
||||||
|
|
||||||
| content | emoji |
|
| content | emoji |
|
||||||
| -- | -- |
|
| -- | -- |
|
||||||
|
@@ -66,7 +66,7 @@ x2 + y2
|
|||||||
"x1" false
|
"x1" false
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📍 `Reactions` 类型
|
## 📍 `emoji` 类型
|
||||||
|
|
||||||
| content | emoji |
|
| content | emoji |
|
||||||
| -- | -- |
|
| -- | -- |
|
||||||
|
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.
|
Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Click `New workflow` to add.
|
Click `New workflow` to add.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<Alert type="success">
|
<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>.
|
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>.
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2.0.0
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -44,18 +44,18 @@ jobs:
|
|||||||
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎PR。
|
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎PR。
|
||||||
```
|
```
|
||||||
- `YML` syntax reference
|
- `YML` syntax reference
|
||||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
- [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
|
- `name`: The workflow name
|
||||||
- Actions workflow name, can be customized according to actual situation
|
- Actions workflow name, can be customized according to actual situation
|
||||||
- `on`: The action trigger condition
|
- `on`: The action trigger condition
|
||||||
- Reference [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
- Reference [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
|
||||||
- `uses`: Use actions name
|
- `uses`: Use actions name
|
||||||
- `uses: actions-cool/issues-helper@v2.0.0`。Please [refer](/en-US/changelog) to version selection
|
- `uses: actions-cool/issues-helper@v2.0.0`。Please [refer](/en-US/changelog) to version selection
|
||||||
- `issues-hepler` parameter
|
- `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
|
- `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
|
- `token`: A person who needs to have push permission token
|
||||||
- [More view](/en-US/guide/ref#-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/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context)
|
- `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
|
- `body`: Incoming parameters, here means the content of the current comment
|
||||||
|
|
||||||
### 3. Enable Action
|
### 3. Enable Action
|
||||||
|
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
点击仓库的 Actions,若已增加过 Actions,会显示如下界面。
|
点击仓库的 Actions,若已增加过 Actions,会显示如下界面。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
点击 `New workflow` 新增。
|
点击 `New workflow` 新增。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<Alert type="success">
|
<Alert type="success">
|
||||||
你可以点击 <Badge>set up a workflow yourself</Badge> 新增一个自定义 action,也可以根据模板来套用新增一个 action。<a target="_blank" href="https://github.com/actions-cool/.github">模板使用</a>。
|
你可以点击 <Badge>set up a workflow yourself</Badge> 新增一个自定义 action,也可以根据模板来套用新增一个 action。<a target="_blank" href="https://github.com/actions-cool/.github">模板使用</a>。
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2.0.0
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -44,18 +44,18 @@ jobs:
|
|||||||
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎PR。
|
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎PR。
|
||||||
```
|
```
|
||||||
- `YML` 语法参考
|
- `YML` 语法参考
|
||||||
- [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/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
|
||||||
- `name`:workflow 名称
|
- `name`:workflow 名称
|
||||||
- Actions 流程名称,可根据实际情况自定义
|
- Actions 流程名称,可根据实际情况自定义
|
||||||
- `on`:action 触发条件
|
- `on`:action 触发条件
|
||||||
- 参考 [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
- 参考 [工作流触发机制](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
|
||||||
- `uses`:使用 actions 名称
|
- `uses`:使用 actions 名称
|
||||||
- `uses: actions-cool/issues-helper@v2.0.0`。版本选择请 [参考](/changelog)
|
- `uses: actions-cool/issues-helper@v2.0.0`。版本选择请 [参考](/changelog)
|
||||||
- `issues-hepler` 参数
|
- `issues-hepler` 参数
|
||||||
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
|
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
|
||||||
- `token`:需拥有 push 权限的人员 token
|
- `token`:需拥有 push 权限的人员 token
|
||||||
- 更多 [参考](/guide/ref#-token-说明)
|
- 更多 [参考](/guide/ref#-token-说明)
|
||||||
- `issue-number`:传入参数,这里表示当前 issue 的编号。如果你对写法疑惑,可 [查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context)
|
- `issue-number`:传入参数,这里表示当前 issue 的编号。如果你对写法疑惑,可 [查看](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context)
|
||||||
- `body`:传入参数,这里表示当前进行评论的内容
|
- `body`:传入参数,这里表示当前进行评论的内容
|
||||||
|
|
||||||
### 3. 启用 Action
|
### 3. 启用 Action
|
||||||
|
@@ -3,19 +3,19 @@ title: Issues Helper
|
|||||||
order: 1
|
order: 1
|
||||||
hero:
|
hero:
|
||||||
title: Issues Helper
|
title: Issues Helper
|
||||||
image: https://avatars1.githubusercontent.com/u/73879334?s=200&v=4
|
image: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ
|
||||||
desc: 🤖 A GitHub Action that easily helps you automatically manage issues
|
desc: 🤖 A GitHub Action that easily helps you automatically manage issues
|
||||||
actions:
|
actions:
|
||||||
- text: Quick start
|
- text: Quick start
|
||||||
link: /en-US/guide/start
|
link: /en-US/guide/start
|
||||||
features:
|
features:
|
||||||
- icon: https://github.com/actions-cool/resources/blob/main/image/free.png?raw=true
|
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*Km0BQJs7vWAAAAAAAAAAAAAAARQnAQ
|
||||||
title: Completely free
|
title: Completely free
|
||||||
desc: Use the Actions service provided by GitHub
|
desc: Use the Actions service provided by GitHub
|
||||||
- icon: https://github.com/actions-cool/resources/blob/main/image/snap.png?raw=true
|
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*ELKWSIMizH0AAAAAAAAAAAAAARQnAQ
|
||||||
title: Easy to use
|
title: Easy to use
|
||||||
desc: Detailed tutorials and rich templates
|
desc: Detailed tutorials and rich templates
|
||||||
- icon: https://github.com/actions-cool/resources/blob/main/image/network.png?raw=true
|
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*j-SURo-DkyIAAAAAAAAAAAAAARQnAQ
|
||||||
title: Easy hosting
|
title: Easy hosting
|
||||||
desc: As long as GitHub is not down, it will not be affected
|
desc: As long as GitHub is not down, it will not be affected
|
||||||
footer: Open-source MIT Licensed | Copyright © 2020-present<br />Powered by xrkffgg
|
footer: Open-source MIT Licensed | Copyright © 2020-present<br />Powered by xrkffgg
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -3,19 +3,19 @@ title: Issues 助手
|
|||||||
order: 1
|
order: 1
|
||||||
hero:
|
hero:
|
||||||
title: Issues 助手
|
title: Issues 助手
|
||||||
image: https://avatars1.githubusercontent.com/u/73879334?s=200&v=4
|
image: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ
|
||||||
desc: 🤖 一个轻松帮你自动管理 issues 的 GitHub Action
|
desc: 🤖 一个轻松帮你自动管理 issues 的 GitHub Action
|
||||||
actions:
|
actions:
|
||||||
- text: 快速开始
|
- text: 快速开始
|
||||||
link: /guide/start
|
link: /guide/start
|
||||||
features:
|
features:
|
||||||
- icon: https://github.com/actions-cool/resources/blob/main/image/free.png?raw=true
|
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*Km0BQJs7vWAAAAAAAAAAAAAAARQnAQ
|
||||||
title: 完全免费
|
title: 完全免费
|
||||||
desc: 使用 GitHub 自带提供的 Actions 服务
|
desc: 使用 GitHub 自带提供的 Actions 服务
|
||||||
- icon: https://github.com/actions-cool/resources/blob/main/image/snap.png?raw=true
|
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*ELKWSIMizH0AAAAAAAAAAAAAARQnAQ
|
||||||
title: 简单易用
|
title: 简单易用
|
||||||
desc: 教程详细,模版丰富
|
desc: 教程详细,模版丰富
|
||||||
- icon: https://github.com/actions-cool/resources/blob/main/image/network.png?raw=true
|
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*j-SURo-DkyIAAAAAAAAAAAAAARQnAQ
|
||||||
title: 轻松托管
|
title: 轻松托管
|
||||||
desc: 只要 GitHub 不宕机,它就不受影响
|
desc: 只要 GitHub 不宕机,它就不受影响
|
||||||
footer: Open-source MIT Licensed | Copyright © 2020-present<br />Powered by xrkffgg
|
footer: Open-source MIT Licensed | Copyright © 2020-present<br />Powered by xrkffgg
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -63,4 +63,4 @@ jobs:
|
|||||||
|
|
||||||
也欢迎加入 钉钉交流群
|
也欢迎加入 钉钉交流群
|
||||||
|
|
||||||

|

|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
html {
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
|
@@ -1,20 +0,0 @@
|
|||||||
.markdown table {
|
|
||||||
width: auto !important;
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown table td:first-child {
|
|
||||||
font-weight: normal !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 1px 5px !important;
|
|
||||||
border-radius: 4px;
|
|
||||||
color: #ff7875 !important;
|
|
||||||
background: rgba(0, 0, 0, 0.06) !important;
|
|
||||||
box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
|
|
||||||
border: 1px solid rgba(0,0,0,0.1);
|
|
||||||
}
|
|
@@ -1,3 +1,10 @@
|
|||||||
|
// main
|
||||||
|
html {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
// dumi
|
||||||
.__dumi-default-code-block {
|
.__dumi-default-code-block {
|
||||||
background-color: rgba(0, 0, 0, 0.04) !important;
|
background-color: rgba(0, 0, 0, 0.04) !important;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -117,3 +124,25 @@
|
|||||||
border-radius: 2px !important;
|
border-radius: 2px !important;
|
||||||
border: 1px solid #0000000f;
|
border: 1px solid #0000000f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// markdown
|
||||||
|
.markdown table {
|
||||||
|
width: auto !important;
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown table td:first-child {
|
||||||
|
font-weight: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 1px 5px !important;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #ff7875 !important;
|
||||||
|
background: rgba(0, 0, 0, 0.06) !important;
|
||||||
|
box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
|
||||||
|
border: 1px solid rgba(0,0,0,0.1);
|
||||||
|
}
|
88
yarn.lock
88
yarn.lock
@@ -264,16 +264,16 @@
|
|||||||
source-map "^0.5.0"
|
source-map "^0.5.0"
|
||||||
|
|
||||||
"@babel/core@>=7.9.0", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.10", "@babel/core@^7.12.16", "@babel/core@^7.12.3", "@babel/core@^7.4.4", "@babel/core@^7.4.5", "@babel/core@^7.7.2", "@babel/core@^7.7.5":
|
"@babel/core@>=7.9.0", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.10", "@babel/core@^7.12.16", "@babel/core@^7.12.3", "@babel/core@^7.4.4", "@babel/core@^7.4.5", "@babel/core@^7.7.2", "@babel/core@^7.7.5":
|
||||||
version "7.17.0"
|
version "7.17.2"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.0.tgz#16b8772b0a567f215839f689c5ded6bb20e864d5"
|
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.2.tgz#2c77fc430e95139d816d39b113b31bf40fb22337"
|
||||||
integrity sha512-x/5Ea+RO5MvF9ize5DeVICJoVrNv0Mi2RnIABrZEKYvPEpldXwauPkgvYA17cKa6WpU3LoYvYbuEMFtSNFsarA==
|
integrity sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@ampproject/remapping" "^2.0.0"
|
"@ampproject/remapping" "^2.0.0"
|
||||||
"@babel/code-frame" "^7.16.7"
|
"@babel/code-frame" "^7.16.7"
|
||||||
"@babel/generator" "^7.17.0"
|
"@babel/generator" "^7.17.0"
|
||||||
"@babel/helper-compilation-targets" "^7.16.7"
|
"@babel/helper-compilation-targets" "^7.16.7"
|
||||||
"@babel/helper-module-transforms" "^7.16.7"
|
"@babel/helper-module-transforms" "^7.16.7"
|
||||||
"@babel/helpers" "^7.17.0"
|
"@babel/helpers" "^7.17.2"
|
||||||
"@babel/parser" "^7.17.0"
|
"@babel/parser" "^7.17.0"
|
||||||
"@babel/template" "^7.16.7"
|
"@babel/template" "^7.16.7"
|
||||||
"@babel/traverse" "^7.17.0"
|
"@babel/traverse" "^7.17.0"
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
browserslist "^4.17.5"
|
browserslist "^4.17.5"
|
||||||
semver "^6.3.0"
|
semver "^6.3.0"
|
||||||
|
|
||||||
"@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.0", "@babel/helper-create-class-features-plugin@^7.2.3", "@babel/helper-create-class-features-plugin@^7.4.4", "@babel/helper-create-class-features-plugin@^7.8.3":
|
"@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.1", "@babel/helper-create-class-features-plugin@^7.2.3", "@babel/helper-create-class-features-plugin@^7.4.4", "@babel/helper-create-class-features-plugin@^7.8.3":
|
||||||
version "7.17.1"
|
version "7.17.1"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.1.tgz#9699f14a88833a7e055ce57dcd3ffdcd25186b21"
|
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.1.tgz#9699f14a88833a7e055ce57dcd3ffdcd25186b21"
|
||||||
integrity sha512-JBdSr/LtyYIno/pNnJ75lBcqc3Z1XXujzPanHqjvvrhOA+DTceTFuJi8XjmWTZh4r3fsdfqaCMN0iZemdkxZHQ==
|
integrity sha512-JBdSr/LtyYIno/pNnJ75lBcqc3Z1XXujzPanHqjvvrhOA+DTceTFuJi8XjmWTZh4r3fsdfqaCMN0iZemdkxZHQ==
|
||||||
@@ -514,10 +514,10 @@
|
|||||||
"@babel/traverse" "^7.16.8"
|
"@babel/traverse" "^7.16.8"
|
||||||
"@babel/types" "^7.16.8"
|
"@babel/types" "^7.16.8"
|
||||||
|
|
||||||
"@babel/helpers@^7.12.1", "@babel/helpers@^7.12.5", "@babel/helpers@^7.13.10", "@babel/helpers@^7.17.0", "@babel/helpers@^7.2.0", "@babel/helpers@^7.4.4", "@babel/helpers@^7.9.0":
|
"@babel/helpers@^7.12.1", "@babel/helpers@^7.12.5", "@babel/helpers@^7.13.10", "@babel/helpers@^7.17.2", "@babel/helpers@^7.2.0", "@babel/helpers@^7.4.4", "@babel/helpers@^7.9.0":
|
||||||
version "7.17.0"
|
version "7.17.2"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.0.tgz#79cdf6c66a579f3a7b5e739371bc63ca0306886b"
|
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.2.tgz#23f0a0746c8e287773ccd27c14be428891f63417"
|
||||||
integrity sha512-Xe/9NFxjPwELUvW2dsukcMZIp6XwPSbI4ojFBJuX5ramHuVE22SVcZIwqzdWo5uCgeTXW8qV97lMvSOjq+1+nQ==
|
integrity sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/template" "^7.16.7"
|
"@babel/template" "^7.16.7"
|
||||||
"@babel/traverse" "^7.17.0"
|
"@babel/traverse" "^7.17.0"
|
||||||
@@ -653,11 +653,11 @@
|
|||||||
"@babel/plugin-syntax-decorators" "^7.8.3"
|
"@babel/plugin-syntax-decorators" "^7.8.3"
|
||||||
|
|
||||||
"@babel/plugin-proposal-decorators@^7.13.5":
|
"@babel/plugin-proposal-decorators@^7.13.5":
|
||||||
version "7.17.0"
|
version "7.17.2"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.17.0.tgz#fc0f689fe2535075056c587bc10c176fa9990443"
|
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.17.2.tgz#c36372ddfe0360cac1ee331a238310bddca11493"
|
||||||
integrity sha512-JR8HTf3T1CsdMqfENrZ9pqncwsH4sPcvsyDLpvmv8iIbpDmeyBD7HPfGAIqkQph2j5d3B84hTm+m3qHPAedaPw==
|
integrity sha512-WH8Z95CwTq/W8rFbMqb9p3hicpt4RX4f0K659ax2VHxgOyT6qQmUaEVEjIh4WR9Eh9NymkVn5vwsrE68fAQNUw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/helper-create-class-features-plugin" "^7.17.0"
|
"@babel/helper-create-class-features-plugin" "^7.17.1"
|
||||||
"@babel/helper-plugin-utils" "^7.16.7"
|
"@babel/helper-plugin-utils" "^7.16.7"
|
||||||
"@babel/helper-replace-supers" "^7.16.7"
|
"@babel/helper-replace-supers" "^7.16.7"
|
||||||
"@babel/plugin-syntax-decorators" "^7.17.0"
|
"@babel/plugin-syntax-decorators" "^7.17.0"
|
||||||
@@ -1990,9 +1990,9 @@
|
|||||||
regenerator-runtime "^0.13.4"
|
regenerator-runtime "^0.13.4"
|
||||||
|
|
||||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.7.7", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
|
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.7.7", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
|
||||||
version "7.17.0"
|
version "7.17.2"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.0.tgz#b8d142fc0f7664fb3d9b5833fd40dcbab89276c0"
|
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941"
|
||||||
integrity sha512-etcO/ohMNaNA2UBdaXBBSX/3aEzFMRrVfaPv8Ptc0k+cWpWW0QFiGZ2XnVqQZI1Cf734LbPGmqBKWESfW4x/dQ==
|
integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==
|
||||||
dependencies:
|
dependencies:
|
||||||
regenerator-runtime "^0.13.4"
|
regenerator-runtime "^0.13.4"
|
||||||
|
|
||||||
@@ -2405,6 +2405,18 @@
|
|||||||
"@jridgewell/resolve-uri" "^3.0.3"
|
"@jridgewell/resolve-uri" "^3.0.3"
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||||
|
|
||||||
|
"@kwsites/file-exists@^1.1.1":
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@kwsites/file-exists/-/file-exists-1.1.1.tgz#ad1efcac13e1987d8dbaf235ef3be5b0d96faa99"
|
||||||
|
integrity sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.1.1"
|
||||||
|
|
||||||
|
"@kwsites/promise-deferred@^1.1.1":
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919"
|
||||||
|
integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==
|
||||||
|
|
||||||
"@lerna/filter-packages@4.0.0":
|
"@lerna/filter-packages@4.0.0":
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-4.0.0.tgz#b1f70d70e1de9cdd36a4e50caa0ac501f8d012f2"
|
resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-4.0.0.tgz#b1f70d70e1de9cdd36a4e50caa0ac501f8d012f2"
|
||||||
@@ -6877,7 +6889,7 @@ chalk@^3.0.0:
|
|||||||
ansi-styles "^4.1.0"
|
ansi-styles "^4.1.0"
|
||||||
supports-color "^7.1.0"
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1:
|
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
||||||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||||
@@ -9155,9 +9167,9 @@ ejs@^2.6.1, ejs@^2.7.4:
|
|||||||
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
|
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
|
||||||
|
|
||||||
electron-to-chromium@^1.3.103, electron-to-chromium@^1.3.247, electron-to-chromium@^1.4.17:
|
electron-to-chromium@^1.3.103, electron-to-chromium@^1.3.247, electron-to-chromium@^1.4.17:
|
||||||
version "1.4.66"
|
version "1.4.67"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.66.tgz#d7453d363dcd7b06ed1757adcde34d724e27b367"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.67.tgz#699e59d6959d05f87865e12b3055bbcf492bbbee"
|
||||||
integrity sha512-f1RXFMsvwufWLwYUxTiP7HmjprKXrqEWHiQkjAYa9DJeVIlZk5v8gBGcaV+FhtXLly6C1OTVzQY+2UQrACiLlg==
|
integrity sha512-A6a2jEPLueEDfb7kvh7/E94RKKnIb01qL+4I7RFxtajmo+G9F5Ei7HgY5PRbQ4RDrh6DGDW66P0hD5XI2nRAcg==
|
||||||
|
|
||||||
element-resize-detector@^1.2.1:
|
element-resize-detector@^1.2.1:
|
||||||
version "1.2.4"
|
version "1.2.4"
|
||||||
@@ -10608,9 +10620,9 @@ focus-lock@^0.10.1:
|
|||||||
tslib "^2.0.3"
|
tslib "^2.0.3"
|
||||||
|
|
||||||
follow-redirects@^1.0.0:
|
follow-redirects@^1.0.0:
|
||||||
version "1.14.7"
|
version "1.14.8"
|
||||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
|
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
|
||||||
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
|
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
|
||||||
|
|
||||||
for-each@^0.3.3:
|
for-each@^0.3.3:
|
||||||
version "0.3.3"
|
version "0.3.3"
|
||||||
@@ -15567,6 +15579,13 @@ nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61"
|
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61"
|
||||||
integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==
|
integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==
|
||||||
|
|
||||||
|
new-github-release-url@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/new-github-release-url/-/new-github-release-url-1.0.0.tgz#493847e6fecce39c247e9d89929be773d2e7f777"
|
||||||
|
integrity sha512-dle7yf655IMjyFUqn6Nxkb18r4AOAkzRcgcZv6WZ0IqrOH4QCEZ8Sm6I7XX21zvHdBeeMeTkhR9qT2Z0EJDx6A==
|
||||||
|
dependencies:
|
||||||
|
type-fest "^0.4.1"
|
||||||
|
|
||||||
next-tick@~1.0.0:
|
next-tick@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
||||||
@@ -15701,9 +15720,9 @@ node-releases@^1.1.29, node-releases@^1.1.3:
|
|||||||
integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==
|
integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==
|
||||||
|
|
||||||
node-releases@^2.0.1:
|
node-releases@^2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5"
|
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01"
|
||||||
integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==
|
integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==
|
||||||
|
|
||||||
"nopt@2 || 3":
|
"nopt@2 || 3":
|
||||||
version "3.0.6"
|
version "3.0.6"
|
||||||
@@ -16093,7 +16112,7 @@ open@^6.3.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-wsl "^1.1.0"
|
is-wsl "^1.1.0"
|
||||||
|
|
||||||
open@^7.0.0:
|
open@^7.0.0, open@^7.3.0:
|
||||||
version "7.4.2"
|
version "7.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321"
|
resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321"
|
||||||
integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==
|
integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==
|
||||||
@@ -17707,9 +17726,9 @@ pretty-time@^1.1.0:
|
|||||||
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
|
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
|
||||||
|
|
||||||
prism-react-renderer@^1.1.1:
|
prism-react-renderer@^1.1.1:
|
||||||
version "1.2.1"
|
version "1.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.2.1.tgz#392460acf63540960e5e3caa699d851264e99b89"
|
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.1.tgz#88fc9d0df6bed06ca2b9097421349f8c2f24e30d"
|
||||||
integrity sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg==
|
integrity sha512-xUeDMEz074d0zc5y6rxiMp/dlC7C+5IDDlaEUlcBOFE2wddz7hz5PNupb087mPwTt7T9BrFmewObfCBuf/LKwQ==
|
||||||
|
|
||||||
prismjs@1.6:
|
prismjs@1.6:
|
||||||
version "1.6.0"
|
version "1.6.0"
|
||||||
@@ -20631,6 +20650,15 @@ signale@1.4.0, signale@^1.3.0, signale@^1.4.0:
|
|||||||
figures "^2.0.0"
|
figures "^2.0.0"
|
||||||
pkg-conf "^2.1.0"
|
pkg-conf "^2.1.0"
|
||||||
|
|
||||||
|
simple-git@^2.46.0:
|
||||||
|
version "2.48.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-2.48.0.tgz#87c262dba8f84d7b96bb3a713e9e34701c1f6e3b"
|
||||||
|
integrity sha512-z4qtrRuaAFJS4PUd0g+xy7aN4y+RvEt/QTJpR184lhJguBA1S/LsVlvE/CM95RsYMOFJG3NGGDjqFCzKU19S/A==
|
||||||
|
dependencies:
|
||||||
|
"@kwsites/file-exists" "^1.1.1"
|
||||||
|
"@kwsites/promise-deferred" "^1.1.1"
|
||||||
|
debug "^4.3.2"
|
||||||
|
|
||||||
simple-swizzle@^0.2.2:
|
simple-swizzle@^0.2.2:
|
||||||
version "0.2.2"
|
version "0.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
|
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
|
||||||
|
Reference in New Issue
Block a user