mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5457ae8d7c | ||
![]() |
0071d48bea | ||
![]() |
25379ae1ea | ||
![]() |
9a2f8c1e68 | ||
![]() |
554782c560 | ||
![]() |
d5f2de3db2 | ||
![]() |
254683255c | ||
![]() |
0d51d36520 | ||
![]() |
635ca07363 | ||
![]() |
36a1dd8767 | ||
![]() |
5586509e90 | ||
![]() |
ecbe084012 | ||
![]() |
596892f346 | ||
![]() |
25313a56b2 | ||
![]() |
464f817556 | ||
![]() |
f2d552d67b | ||
![]() |
b363cba6ec | ||
![]() |
f3f91e4aa4 | ||
![]() |
65840f57fe | ||
![]() |
dbeaa215cb | ||
![]() |
6a55b3a9f4 | ||
![]() |
f4eba4debf | ||
![]() |
09bc8811a0 | ||
![]() |
dfac87c369 | ||
![]() |
275328970d | ||
![]() |
d51658accd | ||
![]() |
12b5247afc |
3
.github/workflows/ci-notice.yml
vendored
3
.github/workflows/ci-notice.yml
vendored
@@ -8,6 +8,9 @@ on:
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@main
|
||||
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -5,6 +5,9 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@main
|
||||
|
3
.github/workflows/gh-pages.yml
vendored
3
.github/workflows/gh-pages.yml
vendored
@@ -8,6 +8,9 @@ on:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: yarn
|
||||
|
2
.github/workflows/preview-build.yml
vendored
2
.github/workflows/preview-build.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: build
|
||||
run: |
|
||||
yarn
|
||||
yarn docs-dev:build
|
||||
yarn docs:preview
|
||||
|
||||
- run: |
|
||||
zip -r dist.zip docs-dist
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@@ -47,6 +47,11 @@ package-lock.json
|
||||
.umi-test
|
||||
.env.local
|
||||
|
||||
# dumi
|
||||
web/.dumi/tmp
|
||||
web/.dumi/tmp-test
|
||||
web/.dumi/tmp-production
|
||||
|
||||
# cache
|
||||
.sass-cache/
|
||||
|
||||
|
30
CHANGELOG.md
30
CHANGELOG.md
@@ -7,6 +7,36 @@
|
||||
🛠 refactor
|
||||
-->
|
||||
|
||||
## v3.5.2
|
||||
|
||||
`2023.08.16`
|
||||
|
||||
- 🐞 fix: return `issue-assignees` in the correct output field for `get-issue`. [#163](https://github.com/actions-cool/issues-helper/pull/163) [@misund](https://github.com/misund)
|
||||
|
||||
## v3.5.1
|
||||
|
||||
`2023.07.27`
|
||||
|
||||
- 💄 perf: `inactive-mode` support `issue-created` `comment-created`.
|
||||
|
||||
## v3.5.0
|
||||
|
||||
`2023.07.19`
|
||||
|
||||
- 🚀 feat: support `inactive-mode`. Optional `comment`, which will check the last comment update time. [#158](https://github.com/actions-cool/issues-helper/pull/158)
|
||||
|
||||
## v3.4.0
|
||||
|
||||
`2023.02.06`
|
||||
|
||||
- 🚀 feat: support `toggle-labels`. [#132](https://github.com/actions-cool/issues-helper/pull/132) [@Wxh16144](https://github.com/Wxh16144)
|
||||
|
||||
## v3.3.3
|
||||
|
||||
`2022.11.13`
|
||||
|
||||
- 🐞 fix: body null case. [#129](https://github.com/actions-cool/issues-helper/pull/129) [@madmansn0w](https://github.com/madmansn0w)
|
||||
|
||||
## v3.3.2
|
||||
|
||||
`2022.10.21`
|
||||
|
192
README.md
192
README.md
@@ -10,7 +10,7 @@
|
||||
|
||||
A GitHub Action that easily helps you automatically manage issues
|
||||
|
||||
[](https://github.com/actions-cool/issues-helper/actions)
|
||||
[](https://github.com/actions-cool/issues-helper/actions)
|
||||
[](https://github.com/marketplace/actions/issues-helper)
|
||||

|
||||
[](https://github.com/umijs/dumi)
|
||||
@@ -56,25 +56,30 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/vueComponent/ant-design-vue">
|
||||
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
|
||||
<a href="https://github.com/ant-design/ant-design-mobile">
|
||||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/b874caa9-4458-412a-9ac6-a61486180a62.svg" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/twbs/bootstrap">
|
||||
<img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" width="46"/>
|
||||
<a href="https://github.com/vueComponent/ant-design-vue">
|
||||
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/ant-design/ant-design">ant-design</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/ant-design-blazor/ant-design-blazor">ant-design-blazor</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/ant-design/ant-design-mobile">ant-design-mobile</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vueComponent/ant-design-vue">ant-design-vue</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/twbs/bootstrap">bootstrap</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/twbs/bootstrap">
|
||||
<img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/umijs/dumi">
|
||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
@@ -87,18 +92,18 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://avatars.githubusercontent.com/u/68583457" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/twbs/bootstrap">bootstrap</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/dumi">dumi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/electron/electron">electron</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/element-plus/element-plus">element-plus</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/alibaba/formily">
|
||||
<img src="https://img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg" width=""/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/dumi">dumi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/electron/electron">electron</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/element-plus/element-plus">element-plus</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/vuejs/jsx-next">
|
||||
<img src="https://avatars.githubusercontent.com/u/6128107?s=200&v=4" width="46"/>
|
||||
@@ -114,18 +119,18 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/mui/material-ui">material-ui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/jdf2e/nutui">
|
||||
<img src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/mui/material-ui">material-ui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/prettier/prettier">
|
||||
<img src="https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png" width="46"/>
|
||||
@@ -141,18 +146,18 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/antvis/S2">
|
||||
<img src="https://gw.alipayobjects.com/mdn/rms_56cbb2/afts/img/A*TI8XSK3W0EkAAAAAAAAAAAAAARQnAQ" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/antvis/S2">S2</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/nolimits4web/swiper">
|
||||
<img src="https://user-images.githubusercontent.com/29775873/156721728-3b0021ea-6932-4a77-a104-2e0bad97346e.png" width="46"/>
|
||||
@@ -168,18 +173,18 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://avatars.githubusercontent.com/u/65625612?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/antvis/S2">S2</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/nolimits4web/swiper">swiper</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/vitest-dev/vitest">
|
||||
<img src="https://user-images.githubusercontent.com/11247099/145112184-a9ff6727-661c-439d-9ada-963124a281f7.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/nolimits4web/swiper">swiper</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vitest-dev/vitest">vitest</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/AttoJS/vue-request">
|
||||
<img src="https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png" width="46"/>
|
||||
@@ -195,13 +200,12 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/vitest-dev/vitest">vitest</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/AttoJS/vue-request">vue-request</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vuepress/vuepress-next">vuepress-next</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -251,11 +255,13 @@ When the following list does not have the features you want, you can submit it i
|
||||
- [`lock-issues`](#lock-issues)
|
||||
- [`mark-assignees`](#mark-assignees)
|
||||
- [`mark-duplicate`](#mark-duplicate)
|
||||
- [`toggle-labels`](#toggle-labels)
|
||||
- [`welcome`](#welcome)
|
||||
|
||||
## 🚀 Usage
|
||||
|
||||
### ⭐ Base
|
||||
<wrapper base data-depth="2" data-warn="DO_NOT_REMOVE_THIS_COMMENT">
|
||||
|
||||
In order to better display the function, the following is an example of the actual scene, please refer to it flexibly.
|
||||
|
||||
@@ -299,7 +305,7 @@ jobs:
|
||||
- `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)
|
||||
|
||||
#### `add-labels`
|
||||
|
||||
@@ -335,7 +341,7 @@ jobs:
|
||||
|
||||
- `labels` support multiple and separated by comma
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `close-issue`
|
||||
|
||||
@@ -357,7 +363,7 @@ Close the specified issue.
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `create-comment`
|
||||
|
||||
@@ -401,7 +407,7 @@ jobs:
|
||||
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
||||
- `emoji` support multiple and separated by comma
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `create-issue`
|
||||
|
||||
@@ -444,7 +450,7 @@ jobs:
|
||||
- No action when `title` is empty
|
||||
- Return `issue-number`. [Usage reference](#outputs-use)
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `create-label`
|
||||
|
||||
@@ -472,7 +478,7 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
|
||||
- `label-name`: If it already exists, no operation
|
||||
- `label-color`: Default is `ededed`
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `delete-comment`
|
||||
|
||||
@@ -493,7 +499,7 @@ According to [`comment-id`](#comment-id) delete the specified comment.
|
||||
| token | [Token explain](#token) | string | ✖ |
|
||||
| comment-id | The comment ID | number | ✔ |
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `get-issue`
|
||||
|
||||
@@ -514,7 +520,7 @@ Query issue information.
|
||||
|
||||
- Return `issue-number` `issue-title` `issue-body` `issue-labels` `issue-assignees` `issue-state`. [Usage reference](#outputs-use)
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `lock-issue`
|
||||
|
||||
@@ -549,7 +555,7 @@ jobs:
|
||||
|
||||
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `open-issue`
|
||||
|
||||
@@ -570,7 +576,7 @@ Open the specified issue.
|
||||
| token | [Token explain](#token) | string | ✖ |
|
||||
| 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)
|
||||
|
||||
#### `remove-assignees`
|
||||
|
||||
@@ -593,7 +599,7 @@ Remove the person designated by issue.
|
||||
| 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 | ✔ |
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `remove-labels`
|
||||
|
||||
@@ -618,7 +624,7 @@ Remove the specified labels.
|
||||
|
||||
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `set-labels`
|
||||
|
||||
@@ -641,7 +647,7 @@ Replace the labels of issue.
|
||||
| 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 | ✔ |
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `unlock-issue`
|
||||
|
||||
@@ -662,7 +668,7 @@ Unlock the specified issue.
|
||||
| token | [Token explain](#token) | string | ✖ |
|
||||
| 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)
|
||||
|
||||
#### `update-comment`
|
||||
|
||||
@@ -703,7 +709,7 @@ jobs:
|
||||
- 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`
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `update-issue`
|
||||
|
||||
@@ -741,9 +747,11 @@ Update the specified issue according to the `issue-number`.
|
||||
- `state` defaults to `open`
|
||||
- When the option is not filled, it will keep the original
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
</wrapper>
|
||||
|
||||
### 🌟 Advanced
|
||||
<wrapper advanced data-depth="2" data-warn="DO_NOT_REMOVE_THIS_COMMENT">
|
||||
|
||||
Advanced usage is not recommended to use multiple actions at the same time.
|
||||
|
||||
@@ -784,6 +792,7 @@ jobs:
|
||||
| body-includes | Body filtering | string | ✖ |
|
||||
| title-includes | Title filtering | string | ✖ |
|
||||
| inactive-day | Inactive days filtering | number | ✖ |
|
||||
| inactive-mode | Detect inactive mode, default `issue` | string | ✖ |
|
||||
| inactive-label | The label name adding | string | ✖ |
|
||||
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||
|
||||
@@ -793,8 +802,15 @@ jobs:
|
||||
- `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-label`: The default is `inactive`, others can be customized. When the project does not contain the label, it will be created automatically
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
- `inactive-mode`:
|
||||
- Default `issue`: the issue updated time
|
||||
- Optional `comment`: the last comment update time
|
||||
- Optional `issue-created`: the issue created time
|
||||
- Optional `comment-created`: the comment creation time
|
||||
- You can also set multiple such as: `comment, issue-created`
|
||||
- It will be detected with priority, the update time of the last comment will be detected first, if there is no comment, the creation time of the issue will be used
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `check-issue`
|
||||
|
||||
@@ -802,9 +818,7 @@ Check whether the issue meets the conditions according to the passed parameters
|
||||
|
||||
The effect of the following example is: when an issue is newly opened, verify whether the current issue designator contains `x1` or `x2`.
|
||||
|
||||
If one designated person is satisfied, the verification will pass, and at the same time, verify whether the title meets the conditions.
|
||||
|
||||
[Check rules](#check-rules)
|
||||
If one designated person is satisfied, the verification will pass, and at the same time, verify whether the title meets the conditions. [Check rules](#check-rules)
|
||||
|
||||
```yml
|
||||
name: Check Issue
|
||||
@@ -840,7 +854,7 @@ jobs:
|
||||
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
||||
- Return `check-result`, due to yml reasons, the judgment condition is `if: steps.xxid.outputs.check-result =='true'`
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `close-issues`
|
||||
|
||||
@@ -887,7 +901,7 @@ jobs:
|
||||
- `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
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `find-comments`
|
||||
|
||||
@@ -925,7 +939,7 @@ 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
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `find-issues`
|
||||
|
||||
@@ -970,7 +984,7 @@ Find the current repository, the creator is k , the title contains `this` , the
|
||||
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `lock-issues`
|
||||
|
||||
@@ -1019,7 +1033,7 @@ jobs:
|
||||
- `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
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `mark-assignees`
|
||||
|
||||
@@ -1057,7 +1071,7 @@ jobs:
|
||||
- Ordinary users have `read` permission
|
||||
- When set `write`, `admin` and `write` meet the conditions
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `mark-duplicate`
|
||||
|
||||
@@ -1103,7 +1117,40 @@ jobs:
|
||||
- Ordinary users have `read` permission
|
||||
- When set `write`, `admin` and `write` meet the conditions
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `toggle-labels`
|
||||
|
||||
When an issue is reopened, the set labels are removed if they already exist, otherwise they are added.
|
||||
|
||||
```yml
|
||||
name: Toggle Labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [reopened]
|
||||
|
||||
jobs:
|
||||
toggle-labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Toggle labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'toggle-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'unread,outdated'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](#token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| labels | The toggle labels. Delete if the label already exists, add if it does not exist | string | ✖ |
|
||||
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
#### `welcome`
|
||||
|
||||
@@ -1144,9 +1191,11 @@ jobs:
|
||||
|
||||
- If these 4 options are not filled, no operation
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
</wrapper>
|
||||
|
||||
## 🎁 Reference
|
||||
<wrapper reference data-depth="1" data-warn="DO_NOT_REMOVE_THIS_COMMENT">
|
||||
|
||||
### token
|
||||
|
||||
@@ -1161,14 +1210,14 @@ Need to have the person token with push permission.
|
||||
|
||||
When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
### GitHub Docs
|
||||
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
||||
- [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
### `outputs` use
|
||||
|
||||
@@ -1188,7 +1237,7 @@ More:
|
||||
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
### Check rules
|
||||
|
||||
@@ -1218,7 +1267,7 @@ x2 + y2
|
||||
"x1" false
|
||||
```
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
### Emoji types
|
||||
|
||||
| content | emoji |
|
||||
@@ -1232,13 +1281,14 @@ x2 + y2
|
||||
| `rocket` | 🚀 |
|
||||
| `eyes` | 👀 |
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
|
||||
### `comment-id`
|
||||
|
||||
Click the `···` icon in the upper right corner of a comment, select `Copy link`, and the number at the end of the url is `comment_id`.
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
[⏫ Back to list](#List)
|
||||
</wrapper>
|
||||
|
||||
## Actions Template
|
||||
|
||||
|
189
README.zh-CN.md
189
README.zh-CN.md
@@ -10,7 +10,7 @@
|
||||
|
||||
一个轻松帮你自动管理 issues 的 GitHub Action
|
||||
|
||||
[](https://github.com/actions-cool/issues-helper/actions)
|
||||
[](https://github.com/actions-cool/issues-helper/actions)
|
||||
[](https://github.com/marketplace/actions/issues-helper)
|
||||

|
||||
[](https://github.com/umijs/dumi)
|
||||
@@ -56,25 +56,30 @@
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/vueComponent/ant-design-vue">
|
||||
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
|
||||
<a href="https://github.com/ant-design/ant-design-mobile">
|
||||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/b874caa9-4458-412a-9ac6-a61486180a62.svg" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/twbs/bootstrap">
|
||||
<img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" width="46"/>
|
||||
<a href="https://github.com/vueComponent/ant-design-vue">
|
||||
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/ant-design/ant-design">ant-design</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/ant-design-blazor/ant-design-blazor">ant-design-blazor</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/ant-design/ant-design-mobile">ant-design-mobile</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vueComponent/ant-design-vue">ant-design-vue</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/twbs/bootstrap">bootstrap</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/twbs/bootstrap">
|
||||
<img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/umijs/dumi">
|
||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
@@ -87,18 +92,18 @@
|
||||
<img src="https://avatars.githubusercontent.com/u/68583457" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/twbs/bootstrap">bootstrap</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/dumi">dumi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/electron/electron">electron</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/element-plus/element-plus">element-plus</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/alibaba/formily">
|
||||
<img src="https://img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg" width=""/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/dumi">dumi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/electron/electron">electron</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/element-plus/element-plus">element-plus</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/vuejs/jsx-next">
|
||||
<img src="https://avatars.githubusercontent.com/u/6128107?s=200&v=4" width="46"/>
|
||||
@@ -114,18 +119,18 @@
|
||||
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/mui/material-ui">material-ui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/jdf2e/nutui">
|
||||
<img src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/mui/material-ui">material-ui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/prettier/prettier">
|
||||
<img src="https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png" width="46"/>
|
||||
@@ -141,18 +146,18 @@
|
||||
<img src="https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/antvis/S2">
|
||||
<img src="https://gw.alipayobjects.com/mdn/rms_56cbb2/afts/img/A*TI8XSK3W0EkAAAAAAAAAAAAAARQnAQ" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/antvis/S2">S2</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/nolimits4web/swiper">
|
||||
<img src="https://user-images.githubusercontent.com/29775873/156721728-3b0021ea-6932-4a77-a104-2e0bad97346e.png" width="46"/>
|
||||
@@ -168,18 +173,18 @@
|
||||
<img src="https://avatars.githubusercontent.com/u/65625612?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/antvis/S2">S2</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/nolimits4web/swiper">swiper</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/vitest-dev/vitest">
|
||||
<img src="https://user-images.githubusercontent.com/11247099/145112184-a9ff6727-661c-439d-9ada-963124a281f7.png" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/nolimits4web/swiper">swiper</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vitest-dev/vitest">vitest</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/AttoJS/vue-request">
|
||||
<img src="https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png" width="46"/>
|
||||
@@ -195,13 +200,12 @@
|
||||
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="180"><a href="https://github.com/vitest-dev/vitest">vitest</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/AttoJS/vue-request">vue-request</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/vuepress/vuepress-next">vuepress-next</a></td>
|
||||
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -255,12 +259,15 @@
|
||||
- [`lock-issues`](#lock-issues)
|
||||
- [`mark-assignees`](#mark-assignees)
|
||||
- [`mark-duplicate`](#mark-duplicate)
|
||||
- [`toggle-labels`](#toggle-labels)
|
||||
- [`welcome`](#welcome)
|
||||
|
||||
## 🚀 使 用
|
||||
|
||||
### ⭐ 基 础
|
||||
|
||||
<wrapper base data-depth="2" data-warn="DO_NOT_REMOVE_THIS_COMMENT">
|
||||
|
||||
为了更好的展示功能,下面以实际场景举例,请灵活参考。
|
||||
|
||||
#### `add-assignees`
|
||||
@@ -303,7 +310,7 @@ jobs:
|
||||
- `assignees` 支持多个,需用逗号隔开
|
||||
- assign 最多只能设定 10 个
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `add-labels`
|
||||
|
||||
@@ -339,7 +346,7 @@ jobs:
|
||||
|
||||
- `labels` 支持多个,需用逗号隔开
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `close-issue`
|
||||
|
||||
@@ -361,7 +368,7 @@ jobs:
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `create-comment`
|
||||
|
||||
@@ -405,7 +412,7 @@ jobs:
|
||||
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
|
||||
- `emoji` 支持多个,需用逗号隔开
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `create-issue`
|
||||
|
||||
@@ -448,7 +455,7 @@ jobs:
|
||||
- `title` 为空时,无操作
|
||||
- 返回 `issue-number`,[用法参考](#outputs-使用)
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `create-label`
|
||||
|
||||
@@ -476,7 +483,7 @@ jobs:
|
||||
- `label-name`:若已存在,则无操作
|
||||
- `label-color`:默认为 `ededed`
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `delete-comment`
|
||||
|
||||
@@ -497,7 +504,7 @@ jobs:
|
||||
| token | [token 说明](#token) | string | ✖ |
|
||||
| comment-id | 指定的 comment | number | ✔ |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `get-issue`
|
||||
|
||||
@@ -518,7 +525,7 @@ jobs:
|
||||
|
||||
- 返回 `issue-number` `issue-title` `issue-body` `issue-labels` `issue-assignees` `issue-state`,[用法参考](#outputs-使用)
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `lock-issue`
|
||||
|
||||
@@ -553,7 +560,7 @@ jobs:
|
||||
|
||||
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `open-issue`
|
||||
|
||||
@@ -574,7 +581,7 @@ jobs:
|
||||
| token | [token 说明](#token) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `remove-assignees`
|
||||
|
||||
@@ -597,7 +604,7 @@ jobs:
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `remove-labels`
|
||||
|
||||
@@ -622,7 +629,7 @@ jobs:
|
||||
|
||||
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `set-labels`
|
||||
|
||||
@@ -645,7 +652,7 @@ jobs:
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `unlock-issue`
|
||||
|
||||
@@ -666,7 +673,7 @@ jobs:
|
||||
| token | [token 说明](#token) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `update-comment`
|
||||
|
||||
@@ -706,7 +713,7 @@ jobs:
|
||||
- `body` 不填时,会保持原有
|
||||
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `update-issue`
|
||||
|
||||
@@ -744,9 +751,11 @@ jobs:
|
||||
- `state` 默认为 `open`
|
||||
- 当可选项不填时,会保持原有
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
</wrapper>
|
||||
|
||||
### 🌟 进 阶
|
||||
<wrapper advanced data-depth="2" data-warn="DO_NOT_REMOVE_THIS_COMMENT">
|
||||
|
||||
进阶用法不建议 actions 多个一次同时使用。
|
||||
|
||||
@@ -787,6 +796,7 @@ jobs:
|
||||
| body-includes | 包含内容筛选 | string | ✖ |
|
||||
| title-includes | 包含标题筛选 | string | ✖ |
|
||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||
| inactive-mode | 检测不活跃的模式 | string | ✖ |
|
||||
| inactive-label | 新增标签名称 | string | ✖ |
|
||||
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||
|
||||
@@ -796,8 +806,15 @@ jobs:
|
||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
- `inactive-mode`:
|
||||
- 默认 `issue`,检查 issue 的更新时间
|
||||
- 可选 `comment`,检查最后一个评论的更新时间
|
||||
- 可选 `issue-created`,检查 issue 的创建时间
|
||||
- 可选 `comment-created`,最后一个评论的创建时间
|
||||
- 你也可以设置多个如:`comment, issue-created`
|
||||
- 将会以优先级检测,先检测最后一条评论更新时间,如无评论,则使用 issue 的创建时间
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `check-issue`
|
||||
|
||||
@@ -839,7 +856,7 @@ jobs:
|
||||
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
||||
- 返回 `check-result`,由于 yml 原因,判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `close-issues`
|
||||
|
||||
@@ -886,7 +903,7 @@ jobs:
|
||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `find-comments`
|
||||
|
||||
@@ -924,7 +941,7 @@ jobs:
|
||||
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `find-issues`
|
||||
|
||||
@@ -969,7 +986,7 @@ jobs:
|
||||
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `lock-issues`
|
||||
|
||||
@@ -1018,7 +1035,7 @@ jobs:
|
||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `mark-assignees`
|
||||
|
||||
@@ -1056,7 +1073,7 @@ jobs:
|
||||
- 普通用户为 `read` 权限
|
||||
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `mark-duplicate`
|
||||
|
||||
@@ -1102,7 +1119,40 @@ jobs:
|
||||
- 普通用户为 `read` 权限
|
||||
- 当设置 `write` 后,`admin` 和 `write` 满足条件
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `toggle-labels`
|
||||
|
||||
当一个 issue 被重新打开,判断设置的 labels 如果已经存在则进行删除,否则进行添加。
|
||||
|
||||
```yml
|
||||
name: Toggle Labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [reopened]
|
||||
|
||||
jobs:
|
||||
toggle-labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Toggle labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'toggle-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'unread,outdated'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](#token) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| labels | 切换 labels。如果 label 已存在则删除,不存在则添加 | string | ✖ |
|
||||
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
#### `welcome`
|
||||
|
||||
@@ -1142,9 +1192,11 @@ jobs:
|
||||
|
||||
- 若这 4 个可选项都不填,则无操作
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
</wrapper>
|
||||
|
||||
## 🎁 参 考
|
||||
<wrapper reference data-depth="1" data-warn="DO_NOT_REMOVE_THIS_COMMENT">
|
||||
|
||||
### token
|
||||
|
||||
@@ -1159,14 +1211,14 @@ jobs:
|
||||
|
||||
当 actions 不填写 token 时,或填写 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)。
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
### GitHub Docs
|
||||
|
||||
- [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/actions/using-workflows/events-that-trigger-workflows)
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
### `outputs` 使用
|
||||
|
||||
@@ -1186,7 +1238,7 @@ jobs:
|
||||
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
### 校验规则
|
||||
|
||||
@@ -1216,7 +1268,7 @@ x2 + y2
|
||||
"x1" false
|
||||
```
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
### emoji 类型
|
||||
|
||||
@@ -1231,13 +1283,14 @@ x2 + y2
|
||||
| `rocket` | 🚀 |
|
||||
| `eyes` | 👀 |
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
|
||||
### `comment-id`
|
||||
|
||||
点击某个评论右上角 `···` 图标,选择 `Copy link`,url 末尾数字即是 `comment_id`。
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
[⏫ 返回列表](#列-表)
|
||||
</wrapper>
|
||||
|
||||
## Actions 模板
|
||||
|
||||
|
4
USERS.js
4
USERS.js
@@ -103,6 +103,10 @@ const users = [
|
||||
url: 'https://github.com/electron/electron',
|
||||
logo: 'https://avatars.githubusercontent.com/u/13409222?s=200&v=4',
|
||||
},
|
||||
{
|
||||
url: 'https://github.com/ant-design/ant-design-mobile',
|
||||
logo: 'https://gw.alipayobjects.com/zos/bmw-prod/b874caa9-4458-412a-9ac6-a61486180a62.svg',
|
||||
},
|
||||
];
|
||||
|
||||
// **************************************************************************
|
||||
|
@@ -75,6 +75,8 @@ inputs:
|
||||
description: 'Query use'
|
||||
inactive-day:
|
||||
description: 'Query use'
|
||||
inactive-mode:
|
||||
description: 'Inactive mode'
|
||||
lock-reason:
|
||||
description: 'The reason lock issue'
|
||||
inactive-label:
|
||||
|
842
dist/index.js
vendored
842
dist/index.js
vendored
File diff suppressed because one or more lines are too long
18
package.json
18
package.json
@@ -14,12 +14,14 @@
|
||||
"docs:build": "APP_ROOT=web dumi build",
|
||||
"docs-dev:build": "APP_ROOT=web UMI_ENV=dev dumi build",
|
||||
"docs:deploy": "gh-pages -d docs-dist",
|
||||
"deploy": "npm run docs:build && npm run docs:deploy",
|
||||
"docs:preview": "PREVIEW=true npm run docs:build",
|
||||
"gh-pages": "npm run docs:build && npm run docs:deploy",
|
||||
"format": "prettier --write **/*.ts **/*/*.ts",
|
||||
"format-check": "prettier --check **/*.ts **/*/*.ts",
|
||||
"lint": "eslint src/*.ts src/*/*.ts",
|
||||
"lint-fix": "eslint src/*.ts src/*/*.ts --fix",
|
||||
"lint-up": "npm run format && npm run lint-fix",
|
||||
"ci:fix": "npm run lint-up",
|
||||
"lint-all": "npm run format-check && npm run lint",
|
||||
"check-commit": "node ./scripts/check-commit.js",
|
||||
"tag": "node ./scripts/tag.js",
|
||||
@@ -44,19 +46,19 @@
|
||||
"@types/lodash": "^4.14.175",
|
||||
"@typescript-eslint/parser": "^4.15.2",
|
||||
"@umijs/fabric": "^2.5.6",
|
||||
"@vercel/ncc": "^0.27.0",
|
||||
"common-tags": "^1.8.2",
|
||||
"dumi": "^1.1.26",
|
||||
"@vercel/ncc": "0.34.0",
|
||||
"chalk": "^4.1.2",
|
||||
"new-github-release-url": "^1.0.0",
|
||||
"open": "^7.3.0",
|
||||
"common-tags": "^1.8.2",
|
||||
"dumi": "^2.1.21",
|
||||
"eslint": "^7.18.0",
|
||||
"eslint-plugin-github": "^4.1.1",
|
||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||
"father": "^2.30.7",
|
||||
"gh-pages": "^3.1.0",
|
||||
"new-github-release-url": "^1.0.0",
|
||||
"open": "^7.3.0",
|
||||
"prettier": "^2.2.1",
|
||||
"typescript": "^4.1.3",
|
||||
"simple-git": "^2.46.0"
|
||||
"simple-git": "^2.46.0",
|
||||
"typescript": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
@@ -38,6 +38,7 @@ async function run() {
|
||||
if (tags.includes(tagSimple)) {
|
||||
console.log(chalk.yellow(`[Git Action] Delete ${tagSimple} tag`));
|
||||
execSync(`git push origin :refs/tags/${tagSimple}`);
|
||||
console.log(chalk.green(`[Git Action] Delete ${tagSimple} tag success`));
|
||||
}
|
||||
|
||||
console.log(chalk.yellow(`[Git Action] Add new simple ${tagSimple} tag`));
|
||||
|
@@ -16,6 +16,7 @@ import {
|
||||
doCreateComment,
|
||||
doCreateCommentEmoji,
|
||||
doLockIssue,
|
||||
doRemoveLabels,
|
||||
doSetLabels,
|
||||
doUpdateComment,
|
||||
} from './base';
|
||||
@@ -58,7 +59,7 @@ export async function doQueryIssues(
|
||||
const titleIncludes = core.getInput('title-includes');
|
||||
|
||||
const excludeLabelsArr = dealStringToArr(excludeLabels);
|
||||
issuesList.forEach(issue => {
|
||||
issuesList.forEach(async issue => {
|
||||
const bodyCheck = bodyIncludes ? issue.body.includes(bodyIncludes) : true;
|
||||
const titleCheck = titleIncludes ? issue.title.includes(titleIncludes) : true;
|
||||
/**
|
||||
@@ -83,8 +84,33 @@ export async function doQueryIssues(
|
||||
dayjs.extend(isSameOrBefore);
|
||||
|
||||
const lastTime = dayjs.utc().subtract(+inactiveDay, 'day');
|
||||
const updateTime = dayjs.utc(issue.updated_at);
|
||||
if (updateTime.isSameOrBefore(lastTime)) {
|
||||
|
||||
const inactiveMode = dealStringToArr(core.getInput('inactive-mode'));
|
||||
let checkTime: dayjs.Dayjs | null = null;
|
||||
|
||||
for (const mode of inactiveMode) {
|
||||
if (checkTime) {
|
||||
break;
|
||||
}
|
||||
if (mode === 'comment' || mode === 'comment-created') {
|
||||
ICE.setIssueNumber(issue.number);
|
||||
const comments = await ICE.listComments();
|
||||
if (comments.length) {
|
||||
checkTime = dayjs.utc(
|
||||
comments[comments.length - 1][mode === 'comment' ? 'updated_at' : 'created_at'],
|
||||
);
|
||||
}
|
||||
}
|
||||
if (mode === 'issue-created') {
|
||||
checkTime = dayjs.utc(issue.created_at);
|
||||
}
|
||||
}
|
||||
|
||||
if (!checkTime) {
|
||||
checkTime = dayjs.utc(issue.updated_at);
|
||||
}
|
||||
|
||||
if (checkTime && checkTime.isSameOrBefore(lastTime)) {
|
||||
issues.push(issue);
|
||||
issueNumbers.push(issue.number);
|
||||
}
|
||||
@@ -361,6 +387,32 @@ export async function doMarkDuplicate(
|
||||
}
|
||||
}
|
||||
|
||||
export async function doToggleLabels(labels: string[] = []) {
|
||||
const issue = await ICE.getIssue();
|
||||
const baseLabels: string[] = issue.labels.map(({ name }: any) => name);
|
||||
|
||||
const addLabels = [];
|
||||
const removeLabels = [];
|
||||
|
||||
for (const label of labels) {
|
||||
if (baseLabels.includes(label)) {
|
||||
removeLabels.push(label);
|
||||
} else {
|
||||
addLabels.push(label);
|
||||
}
|
||||
}
|
||||
|
||||
if (removeLabels.length) {
|
||||
await doRemoveLabels(removeLabels);
|
||||
}
|
||||
|
||||
if (addLabels.length) {
|
||||
await doAddLabels(addLabels);
|
||||
}
|
||||
|
||||
core.info(`[doToggleLabels] Done!`);
|
||||
}
|
||||
|
||||
export async function doWelcome(
|
||||
auth: string,
|
||||
issueNumber: number,
|
||||
|
@@ -104,7 +104,7 @@ export async function doGetIssue() {
|
||||
const labelsString = labels.length ? labels.map(({ name }) => name).join(',') : '';
|
||||
core.setOutput('issue-labels', labelsString);
|
||||
const assigneesString = assignees.length ? assignees.map(({ login }) => login).join(',') : '';
|
||||
core.setOutput('issue-body', assigneesString);
|
||||
core.setOutput('issue-assignees', assigneesString);
|
||||
}
|
||||
|
||||
export async function doLockIssue(issueNumber?: number) {
|
||||
|
@@ -14,6 +14,7 @@ import {
|
||||
doLockIssues,
|
||||
doMarkAssignees,
|
||||
doMarkDuplicate,
|
||||
doToggleLabels,
|
||||
doWelcome,
|
||||
initAdvancedICE,
|
||||
} from './advanced';
|
||||
@@ -251,6 +252,10 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
||||
await doMarkDuplicate(ctx.payload.comment as TCommentInfo, closeReason, labels, emoji);
|
||||
break;
|
||||
}
|
||||
case 'toggle-labels': {
|
||||
await doToggleLabels(labels);
|
||||
break;
|
||||
}
|
||||
case 'welcome': {
|
||||
if (ctx.eventName === 'issues' && ctx.payload.action === 'opened') {
|
||||
await doWelcome(ctx.actor, issueNumber, body, labels, assignees, emoji);
|
||||
|
@@ -56,5 +56,6 @@ export type TAction =
|
||||
| 'lock-issues'
|
||||
| 'mark-assignees'
|
||||
| 'mark-duplicate'
|
||||
| 'toggle-labels'
|
||||
| 'welcome';
|
||||
//// [ Advanced End ]
|
||||
|
@@ -10,7 +10,7 @@ export const dealRandomAssignees = (assignees: string, randomTo: string | void):
|
||||
};
|
||||
|
||||
export const matchKeyword = (content: string = '', keywords: string[]): boolean => {
|
||||
return !!keywords.find(item => content.toLowerCase().includes(item));
|
||||
return !!keywords.find(item => content?.toLowerCase().includes(item));
|
||||
};
|
||||
|
||||
export const checkDuplicate = (body: string | void): boolean => {
|
||||
|
File diff suppressed because one or more lines are too long
47
web/.dumirc.ts
Normal file
47
web/.dumirc.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
// more config: https://d.umijs.org/config
|
||||
import { defineConfig } from 'dumi';
|
||||
import path from 'path';
|
||||
import remarkPlugin from './remark-plugins';
|
||||
|
||||
const name = 'issues-helper';
|
||||
|
||||
const isProdSite =
|
||||
// 不是预览模式 同时是生产环境
|
||||
process.env.PREVIEW !== 'true' && process.env.NODE_ENV === 'production';
|
||||
|
||||
const logo =
|
||||
'https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ';
|
||||
|
||||
export default defineConfig({
|
||||
title: 'Issues Helper',
|
||||
outputPath: '../docs-dist',
|
||||
base: isProdSite ? `/${name}/` : '/',
|
||||
publicPath: isProdSite ? `/${name}/` : '/',
|
||||
locales: [
|
||||
{ id: 'en-US', name: 'English', },
|
||||
{ id: 'zh-CN', name: '中文' },
|
||||
],
|
||||
favicons: [logo],
|
||||
extraRemarkPlugins: [remarkPlugin],
|
||||
themeConfig: {
|
||||
logo,
|
||||
nav: {
|
||||
'zh-CN': [
|
||||
{ title: '指 南', link: '/zh-CN/guide' },
|
||||
{ title: '基 础', link: '/zh-CN/base' },
|
||||
{ title: '进 阶', link: '/zh-CN/advanced' },
|
||||
{ title: '更新日志', link: '/zh-CN/changelog' }
|
||||
],
|
||||
'en-US': [
|
||||
{ title: 'Guide', link: '/guide' },
|
||||
{ title: 'Base', link: '/base' },
|
||||
{ title: 'Advanced', link: '/advanced' },
|
||||
{ title: 'Changelog', link: '/changelog' },
|
||||
],
|
||||
},
|
||||
socialLinks: {
|
||||
github: 'https://github.com/actions-cool/issues-helper'
|
||||
},
|
||||
footer: 'Open-source MIT Licensed | Copyright © 2020-present<br />Powered by xrkffgg'
|
||||
},
|
||||
});
|
@@ -1,4 +0,0 @@
|
||||
export default {
|
||||
base: '/',
|
||||
publicPath: '/',
|
||||
};
|
@@ -1,84 +0,0 @@
|
||||
// more config: https://d.umijs.org/config
|
||||
import { defineConfig } from 'dumi';
|
||||
|
||||
const name = 'issues-helper';
|
||||
|
||||
const logo =
|
||||
'https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ';
|
||||
|
||||
export default defineConfig({
|
||||
title: 'Issues Helper',
|
||||
mode: 'site',
|
||||
favicon: logo,
|
||||
logo,
|
||||
exportStatic: {},
|
||||
ssr: {},
|
||||
outputPath: '../docs-dist',
|
||||
resolve: {
|
||||
includes: ['./docs'],
|
||||
},
|
||||
hash: true,
|
||||
base: `/${name}/`,
|
||||
publicPath: `/${name}/`,
|
||||
locales: [
|
||||
['en-US', 'English'],
|
||||
['zh-CN', '中文'],
|
||||
],
|
||||
theme: {
|
||||
'@c-primary': '#1890ff',
|
||||
},
|
||||
navs: {
|
||||
'en-US': [
|
||||
{ title: 'Guide', path: '/guide' },
|
||||
{ title: 'Base', path: '/base' },
|
||||
{ title: 'Advanced', path: '/advanced' },
|
||||
{ title: 'Changelog', path: '/changelog' },
|
||||
{ title: 'GitHub', path: 'https://github.com/actions-cool/issues-helper' },
|
||||
],
|
||||
'zh-CN': [
|
||||
{ title: '指 南', path: '/zh-CN/guide' },
|
||||
{ title: '基 础', path: '/zh-CN/base' },
|
||||
{ title: '进 阶', path: '/zh-CN/advanced' },
|
||||
{ title: '更新日志', path: '/zh-CN/changelog' },
|
||||
{ title: 'GitHub', path: 'https://github.com/actions-cool/issues-helper' },
|
||||
],
|
||||
},
|
||||
menus: {
|
||||
'/guide': [
|
||||
{
|
||||
title: '🍭 Guide',
|
||||
children: ['/guide/index', '/guide/start'],
|
||||
},
|
||||
{
|
||||
title: '🎁 Reference',
|
||||
path: '/guide/ref',
|
||||
},
|
||||
{
|
||||
title: '🎗 Note',
|
||||
path: '/guide/note',
|
||||
},
|
||||
{
|
||||
title: '💬 FAQ',
|
||||
path: '/guide/faq',
|
||||
},
|
||||
],
|
||||
'/zh-CN/guide': [
|
||||
{
|
||||
title: '🍭 介 绍',
|
||||
children: ['/guide/index', '/guide/start'],
|
||||
},
|
||||
{
|
||||
title: '🎁 参 考',
|
||||
path: '/guide/ref',
|
||||
},
|
||||
{
|
||||
title: '🎗 记 录',
|
||||
path: '/guide/note',
|
||||
},
|
||||
{
|
||||
title: '💬 FAQ',
|
||||
path: '/guide/faq',
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
@@ -1,2 +0,0 @@
|
||||
// For dumi style
|
||||
import './web.less';
|
@@ -1,391 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 🌟 Advanced
|
||||
---
|
||||
|
||||
# 🌟 Advanced
|
||||
|
||||
Advanced usage is not recommended to use multiple actions at the same time.
|
||||
|
||||
## `check-inactive`
|
||||
|
||||
At UTC 0 on the 1st of each month, add the `inactive` tag to all issues that have not been active for more than 30 days.
|
||||
|
||||
```yml
|
||||
name: Check inactive
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
|
||||
jobs:
|
||||
check-inactive:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
inactive-day: 30
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||
| contents | Add [reaction](/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||
| labels | Labels filtering | string | ✖ |
|
||||
| issue-state | State filtering | string | ✖ |
|
||||
| issue-assignee | Assignee filtering | string | ✖ |
|
||||
| issue-creator | Creator filtering | string | ✖ |
|
||||
| issue-mentioned | Mentioned filtering | string | ✖ |
|
||||
| body-includes | Body filtering | string | ✖ |
|
||||
| title-includes | Title filtering | string | ✖ |
|
||||
| inactive-day | Inactive days filtering | number | ✖ |
|
||||
| inactive-label | The label name adding | string | ✖ |
|
||||
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||
|
||||
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
|
||||
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
|
||||
- `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-label`: The default is `inactive`, others can be customized. When the project does not contain the label, it will be created automatically
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
## `check-issue`
|
||||
|
||||
Check whether the issue meets the conditions according to the passed parameters and `issue-number`, and return a boolean value.
|
||||
|
||||
The effect of the following example is: when an issue is newly opened, verify whether the current issue designator contains `x1` or `x2`.
|
||||
|
||||
If one designated person is satisfied, the verification will pass, and at the same time, verify whether the title meets the conditions.
|
||||
|
||||
[Check rules](/guide/ref#-includes-check-rules)
|
||||
|
||||
```yml
|
||||
name: Check Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [edited]
|
||||
|
||||
jobs:
|
||||
check-issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignee-includes: 'x1,x2'
|
||||
title-includes: 'x1,x2/y1,y2'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| assignee-includes | Assignees contains check | string | ✖ |
|
||||
| title-includes | Title contains check | string | ✖ |
|
||||
| title-excludes | Check whether the title is empty after removing the default title | string | ✖ |
|
||||
| body-includes | Body contains check | string | ✖ |
|
||||
|
||||
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
||||
- Return `check-result`, due to yml reasons, the judgment condition is `if: steps.xxid.outputs.check-result =='true'`
|
||||
|
||||
## `close-issues`
|
||||
|
||||
Every 7 days at UTC 0, close the issues that have been filled with the `need info` label and have not been active for more than 7 days.
|
||||
|
||||
```yml
|
||||
name: Check need info
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 */7 * *"
|
||||
|
||||
jobs:
|
||||
check-need-info:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
labels: 'need info'
|
||||
inactive-day: 7
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||
| contents | Add [reaction](/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||
| labels | Labels filtering | string | ✖ |
|
||||
| issue-assignee | Assignee filtering | string | ✖ |
|
||||
| issue-creator | Creator filtering | string | ✖ |
|
||||
| issue-mentioned | Mentioned filtering | string | ✖ |
|
||||
| body-includes | Body filtering | string | ✖ |
|
||||
| title-includes | Title filtering | string | ✖ |
|
||||
| inactive-day | Inactive days filtering | number | ✖ |
|
||||
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||
|
||||
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
|
||||
- `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
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
## `find-comments`
|
||||
|
||||
Find the current warehouse issue No. 1, the creator is k and the content contains the comment list of `this`.
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: 1
|
||||
comment-auth: 'k'
|
||||
body-includes: 'this'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
||||
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
||||
| direction | Return `comments` sort | string | ✖ |
|
||||
|
||||
- Return `comments` in the following format:
|
||||
|
||||
```js
|
||||
[
|
||||
{id: 1, auth: 'x', body: 'xxx', created: '', updated: ''},
|
||||
{id: 2, auth: 'x', body: 'xxx', 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
|
||||
## `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](/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
|
||||
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
## `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.
|
||||
|
||||
```yml
|
||||
name: Lock inactive issues
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 */3 *"
|
||||
|
||||
jobs:
|
||||
lock-issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
labels: 'inactive'
|
||||
inactive-day: 128
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
||||
| contents | Add [reaction](/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||
| labels | Labels filtering | string | ✖ |
|
||||
| issue-state | State filtering | string | ✖ |
|
||||
| issue-assignee | Assignee filtering | string | ✖ |
|
||||
| issue-creator | Creator filtering | string | ✖ |
|
||||
| issue-mentioned | Mentioned filtering | string | ✖ |
|
||||
| body-includes | Body filtering | string | ✖ |
|
||||
| title-includes | Title filtering | string | ✖ |
|
||||
| inactive-day | Inactive days filtering | number | ✖ |
|
||||
| lock-reason | Reason for locking issue | string | ✖ |
|
||||
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||
|
||||
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
|
||||
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
|
||||
- `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
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
||||
## `mark-assignees`
|
||||
|
||||
Quickly assign person, only for the issue to add editor comments.
|
||||
|
||||
```yml
|
||||
name: Issue Mark Assignees
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-assignees:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-assignees
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'mark-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| assign-command | Simple commands can be set, such as: `/a` | string | ✖ |
|
||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||
|
||||
- `assign-command`: default `/assign`
|
||||
- `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
|
||||
|
||||
## `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](/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](/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 | ✖ |
|
||||
| close-reason | Reason for closing. Default `not_planned`, another `completed` | 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](/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](/guide/ref#-emoji-type) to this issue| string | ✖ |
|
||||
|
||||
- If these 4 options are not filled, no operation
|
||||
<embed src="../../README.md#RE-/<wrapper advanced [^>]*>([\s\S]*?)<\/wrapper>/"></embed>
|
||||
|
@@ -1,386 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 🌟 进 阶
|
||||
---
|
||||
|
||||
# 🌟 进 阶
|
||||
|
||||
进阶用法不建议 actions 多个一次同时使用。
|
||||
|
||||
## `check-inactive`
|
||||
|
||||
每月 1 号 UTC 0 时,对所有 30 天以上未活跃的 issues 增加 `inactive` 标签。
|
||||
|
||||
```yml
|
||||
name: Check inactive
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
|
||||
jobs:
|
||||
check-inactive:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
inactive-day: 30
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||
| emoji | 为该评论增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
| labels | 标签筛选 | string | ✖ |
|
||||
| issue-state | 状态筛选 | string | ✖ |
|
||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||
| issue-creator | 创建人筛选 | string | ✖ |
|
||||
| issue-mentioned | 提及人筛选 | string | ✖ |
|
||||
| body-includes | 包含内容筛选 | string | ✖ |
|
||||
| title-includes | 包含标题筛选 | string | ✖ |
|
||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||
| inactive-label | 新增标签名称 | string | ✖ |
|
||||
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||
|
||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
## `check-issue`
|
||||
|
||||
根据传入的参数和 `issue-number` 来检查该 issue 是否满足条件,返回一个布尔值。
|
||||
|
||||
下面的例子效果是:当 issue 新开时,校验当前 issue 指定人是否包含 `x1` 或者 `x2`,满足一个指定人即可校验通过,同时校验标题是否满足条件,[校验规则](/zh-CN/guide/ref#-includes-校验规则)。
|
||||
|
||||
```yml
|
||||
name: Check Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [edited]
|
||||
|
||||
jobs:
|
||||
check-issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignee-includes: 'x1,x2'
|
||||
title-includes: 'x1,x2/y1,y2'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||
| title-includes | 标题包含校验 | string | ✖ |
|
||||
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||
| body-includes | 内容包含校验 | string | ✖ |
|
||||
|
||||
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
||||
- 返回 `check-result`,由于 yml 原因,判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
|
||||
|
||||
## `close-issues`
|
||||
|
||||
每 7 天 UTC 0 时,关闭已填加 `need info` label 且 7 天以上未活跃的 issues。
|
||||
|
||||
```yml
|
||||
name: Check need info
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 */7 * *"
|
||||
|
||||
jobs:
|
||||
check-need-info:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
labels: 'need info'
|
||||
inactive-day: 7
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||
| emoji | 为该评论增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
| labels | 标签筛选 | string | ✖ |
|
||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||
| issue-creator | 创建人筛选 | string | ✖ |
|
||||
| issue-mentioned | 提及人筛选 | string | ✖ |
|
||||
| body-includes | 包含内容筛选 | string | ✖ |
|
||||
| title-includes | 包含标题筛选 | string | ✖ |
|
||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||
|
||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
## `find-comments`
|
||||
|
||||
查找当前仓库 1 号 issue 中,创建者是 k ,内容包含 `this` 的评论列表。
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: 1
|
||||
comment-auth: 'k'
|
||||
body-includes: 'this'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
||||
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
||||
| direction | 返回 `comments` 排序 | string | ✖ |
|
||||
|
||||
- 返回 `comments`,格式如下:
|
||||
|
||||
```js
|
||||
[
|
||||
{id: 1, auth: 'x', body: 'xxx', created: '', updated: ''},
|
||||
{id: 2, auth: 'x', body: 'xxx', created: '', updated: ''},
|
||||
]
|
||||
```
|
||||
|
||||
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||
- 返回数组中 `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 说明](/zh-CN/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
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
## `lock-issues`
|
||||
|
||||
每 3 个月 1 号 UTC 0 时,锁定已填加 `inactive` label 且 128 天以上未活跃的所有 issues。
|
||||
|
||||
```yml
|
||||
name: Lock inactive issues
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 */3 *"
|
||||
|
||||
jobs:
|
||||
lock-issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
labels: 'inactive'
|
||||
inactive-day: 128
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| body | 操作 issue 时,可进行评论。不填时,不评论 | string | ✖ |
|
||||
| emoji | 为该评论增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
| labels | 标签筛选 | string | ✖ |
|
||||
| issue-state | 状态筛选 | string | ✖ |
|
||||
| issue-assignee | 指定人筛选 | string | ✖ |
|
||||
| issue-creator | 创建人筛选 | string | ✖ |
|
||||
| issue-mentioned | 提及人筛选 | string | ✖ |
|
||||
| body-includes | 包含内容筛选 | string | ✖ |
|
||||
| title-includes | 包含标题筛选 | string | ✖ |
|
||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||
|
||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||
|
||||
## `mark-assignees`
|
||||
|
||||
快捷加指定人,仅作用于 issue 新增编辑评论。
|
||||
|
||||
```yml
|
||||
name: Issue Mark Assignees
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-assignees:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-assignees
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'mark-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| assign-command | 可设置简洁命令,如:`/a` | string | ✖ |
|
||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||
|
||||
- `assign-command`:可设置简洁命令。默认:`/assign`
|
||||
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||
- 团队成员若设置 `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 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| duplicate-command | 可设置简洁命令,如:`/d` | string | ✖ |
|
||||
| duplicate-labels | 为该 issue 额外增加 labels | string | ✖ |
|
||||
| remove-labels | 设置可移除的 labels | string | ✖ |
|
||||
| labels | 替换该 issue 的 labels | string | ✖ |
|
||||
| emoji | 为该评论的增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | 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 说明](/zh-CN/guide/ref#-token-说明) | string | ✔ |
|
||||
| body | 评论欢迎的内容,不填则不评论 | string | ✖ |
|
||||
| labels | 为该 issue 增加 labels | string | ✖ |
|
||||
| assignees | 为该 issue 增加 assignees | string | ✖ |
|
||||
| issue-emoji | 为该 issue 增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
|
||||
- 若这 4 个可选项都不填,则无操作
|
||||
<embed src="../../README.zh-CN.md#RE-/<wrapper advanced [^>]*>([\s\S]*?)<\/wrapper>/"></embed>
|
||||
|
459
web/docs/base.md
459
web/docs/base.md
@@ -1,460 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: ⭐ Base
|
||||
---
|
||||
|
||||
# ⭐ Base
|
||||
|
||||
In order to better display the function, the following is an example of the actual scene, please refer to it flexibly.
|
||||
|
||||
## `add-assignees`
|
||||
|
||||
When an issue is added or modified, assign this issue to one or more people.
|
||||
|
||||
```yml
|
||||
name: Add Assigness
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited]
|
||||
|
||||
jobs:
|
||||
add-assigness:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xxx' or 'xx1,xx2'
|
||||
random-to: 1
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||
|
||||
- `actions` support multiple and separated by comma. Like: `add-assignees,add-labels`
|
||||
- The `name` can be modified according to the actual situation
|
||||
- [Reference to on](/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)
|
||||
- `assignees` support multiple and separated by comma
|
||||
- You can assign up to 10 people to each issue
|
||||
|
||||
## `add-labels`
|
||||
|
||||
When the content of a new issue does not contain the specified format, add labels for the issue.
|
||||
|
||||
```yml
|
||||
name: Add Labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
add-labels:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'bug' or 'xx1,xx2'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
||||
|
||||
- `labels` support multiple and separated by comma
|
||||
|
||||
## `close-issue`
|
||||
|
||||
Close the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: xxx
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||
|
||||
## `create-comment`
|
||||
|
||||
When a designated label is added, comment on the issue.
|
||||
|
||||
```yml
|
||||
name: Create Comment
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
create-comment:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
Hello @${{ github.event.issue.user.login }}. Add some comments.
|
||||
|
||||
你好 @${{ github.event.issue.user.login }}。巴拉巴拉。
|
||||
emoji: '+1' or '+1,heart'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| body | Add comment content | string | ✖ |
|
||||
| emoji | Add [emoji](/guide/ref#-emoji-type) | string | ✖ |
|
||||
|
||||
- No action when `body` is empty
|
||||
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](/guide/ref#-outputs-use)
|
||||
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
||||
- `emoji` support multiple and separated by comma
|
||||
|
||||
## `create-issue`
|
||||
|
||||
Here is an example, add an issue at UTC 00:00 on the 1st of every month.
|
||||
|
||||
```yml
|
||||
name: Create Issue
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
|
||||
jobs:
|
||||
create-issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: 'xxxx'
|
||||
body: 'xxxx'
|
||||
labels: 'xx'
|
||||
assignees: 'xxx'
|
||||
emoji: '+1'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| title | The title of the new issue | string | ✖ |
|
||||
| body | The body of the new issue | string | ✖ |
|
||||
| labels | The labels 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 | ✖ |
|
||||
| emoji | Add [emoji](/guide/ref#-emoji-type) | string | ✖ |
|
||||
|
||||
- `title` default is `Default Title`
|
||||
- Return `issue-number`. [Usage reference](/guide/ref#-outputs-use)
|
||||
|
||||
## `create-label`
|
||||
|
||||
Create label. If you want to maintain labels in batches, [see](https://github.com/actions-cool/labels-helper).
|
||||
|
||||
```yml
|
||||
- name: Create label
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-label'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label-name: 'xx'
|
||||
label-color: '0095b3'
|
||||
label-desc: 'xx'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| label-name | Label name, emoji support | string | ✔ |
|
||||
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||
| label-desc | Label description | string | ✖ |
|
||||
|
||||
- `label-name`: If it already exists, no operation
|
||||
- `label-color`: Default is `ededed`
|
||||
|
||||
## `delete-comment`
|
||||
|
||||
According to [`comment-id`](/guide/ref#-comment-id) delete the specified comment.
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment-id: xxx
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| comment-id | The comment ID | number | ✔ |
|
||||
|
||||
## `get-issue`
|
||||
|
||||
Query issue information.
|
||||
|
||||
```yml
|
||||
- name: Get Issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'get-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
|
||||
- Return `issue-number` `issue-title` `issue-body` `issue-labels` `issue-assignees` `issue-state`. [Usage reference](/guide/ref#-outputs-use)
|
||||
|
||||
## `lock-issue`
|
||||
|
||||
When the `invalid` label is added, the issue is locked.
|
||||
|
||||
```yml
|
||||
name: Lock Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
lock-issue:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| lock-reason | Reason for locking issue | string | ✖ |
|
||||
|
||||
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
||||
|
||||
## `open-issue`
|
||||
|
||||
Open the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: xxx
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
|
||||
## `remove-assignees`
|
||||
|
||||
Remove the person designated by issue.
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xx'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
||||
|
||||
## `remove-labels`
|
||||
|
||||
Remove the specified labels.
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'xx'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
||||
|
||||
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
|
||||
|
||||
## `set-labels`
|
||||
|
||||
Replace the labels of issue.
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'xx'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
||||
|
||||
## `unlock-issue`
|
||||
|
||||
Unlock the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
|
||||
## `update-comment`
|
||||
|
||||
Update the specified comment according to [`comment-id`](/guide/ref#-comment-id).
|
||||
|
||||
The following example shows that 👀 is added for each new comment.
|
||||
|
||||
```yml
|
||||
name: Add eyes to each comment
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
update-comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment-id: ${{ github.event.comment.id }}
|
||||
emoji: 'eyes'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| comment-id | The comment ID | number | ✔ |
|
||||
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||
| body | Update the content of comment | string | ✖ |
|
||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||
| emoji | Add [emoji](/guide/ref#-emoji-type) | string | ✖ |
|
||||
|
||||
- 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 `out-comments` is entered, `comment-id` does not work
|
||||
|
||||
## `update-issue`
|
||||
|
||||
Update the specified issue according to the `issue-number`.
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
state: 'open'
|
||||
title: 'xxx'
|
||||
body: 'xxxx'
|
||||
update-mode: 'replace'
|
||||
labels: 'xx'
|
||||
assignees: 'xxx'
|
||||
emoji: '+1'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/guide/ref#-token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
||||
| title | Modify the title of the issue | string | ✖ |
|
||||
| body | Modify the content of issue | string | ✖ |
|
||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||
| labels | Replace the labels of issue | string | ✖ |
|
||||
| assignees | Replace the assignees of issue | string | ✖ |
|
||||
| emoji | Add [emoji](/guide/ref#-emoji-type) | string | ✖ |
|
||||
|
||||
- `state` defaults to `open`
|
||||
- When the option is not filled, it will keep the original
|
||||
<embed src="../../README.md#RE-/<wrapper base [^>]*>([\s\S]*?)<\/wrapper>/"></embed>
|
||||
|
@@ -1,460 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: ⭐ 基 础
|
||||
---
|
||||
|
||||
为了更好的展示功能,下面以实际场景举例,请灵活参考。
|
||||
|
||||
# ⭐ 基 础
|
||||
|
||||
## `add-assignees`
|
||||
|
||||
当一个 issue 新增或修改时,将这个 issue 指定某人或多人。
|
||||
|
||||
```yml
|
||||
name: Add Assigness
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited]
|
||||
|
||||
jobs:
|
||||
add-assigness:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xxx' or 'xx1,xx2'
|
||||
random-to: 1
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||
|
||||
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
||||
- 其中的 `name` 可根据自行根据实际情况修改
|
||||
- [on 参考](/zh-CN/guide/ref#-github-相关文档)
|
||||
- `${{ github.event.issue.number }}` 表示当前 issue,[更多参考](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
|
||||
- `assignees` 支持多个,需用逗号隔开
|
||||
- assign 最多只能设定 10 个
|
||||
|
||||
## `add-labels`
|
||||
|
||||
当一个新增的 issue 内容不包含指定格式时,为这个 issue 添加 labels。
|
||||
|
||||
```yml
|
||||
name: Add Labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
add-labels:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'bug' or 'bug1,bug2'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
||||
|
||||
- `labels` 支持多个,需用逗号隔开
|
||||
|
||||
## `close-issue`
|
||||
|
||||
关闭指定 issue。
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: xxx
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||
|
||||
## `create-comment`
|
||||
|
||||
当新增一个指定 label 时,对该 issue 进行评论。
|
||||
|
||||
```yml
|
||||
name: Create Comment
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
create-comment:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
Hello ${{ github.event.issue.user.login }}. Add some comments.
|
||||
|
||||
你好 ${{ github.event.issue.user.login }}。巴拉巴拉。
|
||||
emoji: '+1' or '+1,heart'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| body | 新增评论的内容 | string | ✖ |
|
||||
| emoji | 为新增评论的增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
|
||||
- `body` 为空时,无操作
|
||||
- 返回 `comment-id`,可用于之后操作。[用法参考](/zh-CN/guide/ref#-outputs-使用)
|
||||
- `${{ github.event.issue.user.login }}` 表示该 issue 的创建者
|
||||
- `emoji` 支持多个,需用逗号隔开
|
||||
|
||||
## `create-issue`
|
||||
|
||||
感觉新增 issue 使用场景不多。这里举例,每月 1 号 UTC 00:00 新增一个 issue。
|
||||
|
||||
```yml
|
||||
name: Create Issue
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
|
||||
jobs:
|
||||
create-issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: 'xxxx'
|
||||
body: 'xxxx'
|
||||
labels: 'xx'
|
||||
assignees: 'xxx'
|
||||
emoji: '+1'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| title | 新增 issue 的标题 | string | ✖ |
|
||||
| body | 新增 issue 的内容 | string | ✖ |
|
||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||
| emoji | 为新增 issue 增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
|
||||
- `title` 默认为:`Default Title`
|
||||
- 返回 `issue-number`,[用法参考](/zh-CN/guide/ref#-outputs-使用)
|
||||
|
||||
## `create-label`
|
||||
|
||||
新增 label。若想批量维护 labels,[可查看](https://github.com/actions-cool/labels-helper)。
|
||||
|
||||
```yml
|
||||
- name: Create label
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-label'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label-name: 'xx'
|
||||
label-color: '0095b3'
|
||||
label-desc: 'xx'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||
| label-desc | 标签描述 | string | ✖ |
|
||||
|
||||
- `label-name`:若已存在,则无操作
|
||||
- `label-color`:默认为 `ededed`
|
||||
|
||||
## `delete-comment`
|
||||
|
||||
根据 [`comment-id`](/zh-CN/guide/ref#-comment-id) 删除指定评论。
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment-id: xxx
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| comment-id | 指定的 comment | number | ✔ |
|
||||
|
||||
## `get-issue`
|
||||
|
||||
查询 issue 信息。
|
||||
|
||||
```yml
|
||||
- name: Get Issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'get-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
|
||||
- 返回 `issue-number` `issue-title` `issue-body` `issue-labels` `issue-assignees` `issue-state`,[用法参考](/zh-CN/guide/ref#-outputs-使用)
|
||||
|
||||
## `lock-issue`
|
||||
|
||||
当新增 `invalid` label 时,对该 issue 进行锁定。
|
||||
|
||||
```yml
|
||||
name: Lock Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
lock-issue:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||
|
||||
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
||||
|
||||
## `open-issue`
|
||||
|
||||
打开指定 issue。
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: xxx
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
|
||||
## `remove-assignees`
|
||||
|
||||
移除 issue 指定人员。
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xx'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
||||
|
||||
## `remove-labels`
|
||||
|
||||
移除指定 labels。
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'xx'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
||||
|
||||
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
|
||||
|
||||
## `set-labels`
|
||||
|
||||
替换 issue 的 labels。
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'xx'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
||||
|
||||
## `unlock-issue`
|
||||
|
||||
解锁指定 issue。
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
|
||||
## `update-comment`
|
||||
|
||||
根据 [`comment-id`](/zh-CN/guide/ref#-comment-id) 更新指定评论。
|
||||
|
||||
下面的例子展示的是,为每个新增的 comment 增加 👀 。
|
||||
|
||||
```yml
|
||||
name: Add eyes to each comment
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
update-comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment-id: ${{ github.event.comment.id }}
|
||||
emoji: 'eyes'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| comment-id | 指定的 comment | number | ✔ |
|
||||
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
||||
| body | 更新 comment 的内容 | string | ✖ |
|
||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||
| emoji | 增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
|
||||
- `body` 不填时,会保持原有
|
||||
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
||||
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
||||
|
||||
## `update-issue`
|
||||
|
||||
根据 `issue-number` 更新指定 issue。
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
state: 'open'
|
||||
title: 'xxx'
|
||||
body: 'xxxx'
|
||||
update-mode: 'replace'
|
||||
labels: 'xx'
|
||||
assignees: 'xxx'
|
||||
emoji: '+1'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/zh-CN/guide/ref#-token-说明) | string | ✖ |
|
||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
||||
| title | 修改 issue 的标题 | string | ✖ |
|
||||
| body | 修改 issue 的内容 | string | ✖ |
|
||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||
| labels | 替换 issue 的 labels | string | ✖ |
|
||||
| assignees | 替换 issue 的 assignees | string | ✖ |
|
||||
| emoji | 增加 [emoji](/zh-CN/guide/ref#-emoji-类型) | string | ✖ |
|
||||
|
||||
- `state` 默认为 `open`
|
||||
- 当可选项不填时,会保持原有
|
||||
<embed src="../../README.zh-CN.md#RE-/<wrapper base [^>]*>([\s\S]*?)<\/wrapper>/"></embed>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 💬 FAQ
|
||||
---
|
||||
|
||||
## Is there a charge for this feature?
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 💬 FAQ
|
||||
---
|
||||
|
||||
## 该功能是否收费?
|
||||
|
@@ -1,4 +1,6 @@
|
||||
## Introduction
|
||||
---
|
||||
title: 🍭 Guide
|
||||
---
|
||||
|
||||
The Issues Helper is a GitHub Action that easily helps you automatically manage issues.
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
## 介 绍
|
||||
---
|
||||
title: 🍭 介 绍
|
||||
---
|
||||
|
||||
Issues 助手是一个轻松帮你自动管理 issues 的 GitHub Action。
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 🎗 Note
|
||||
---
|
||||
|
||||
<Alert type="success">
|
||||
:::success{title="😊"}
|
||||
Here are some things I summarized in my use, I hope it can help you.
|
||||
</Alert>
|
||||
:::
|
||||
|
||||
## Include judgment in `yml`
|
||||
|
||||
@@ -23,10 +23,10 @@ if: contains(github.event.issue.body, 'ie') == false
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
count-lables: 'true'
|
||||
count-labels: 'true'
|
||||
```
|
||||
|
||||
- `count-lables`: Regardless of setting `true` or `'ture'`, all received in the program is in string format
|
||||
- `count-labels`: Regardless of setting `true` or `'ture'`, all received in the program is in string format
|
||||
|
||||
At the same time, the output is also in string format. [See](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs).
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 🎗 记 录
|
||||
---
|
||||
|
||||
<Alert type="success">
|
||||
:::success{title="😊"}
|
||||
这里记录自己在使用中总结的一些东西,希望可以帮助到你。
|
||||
</Alert>
|
||||
:::
|
||||
|
||||
## `yml` 中包含判断
|
||||
|
||||
@@ -24,10 +24,10 @@ if: contains(github.event.issue.body, 'ie') == false
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
count-lables: 'true'
|
||||
count-labels: 'true'
|
||||
```
|
||||
|
||||
- `count-lables`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
|
||||
- `count-labels`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
|
||||
|
||||
同时输出的也是字符串格式。[参看](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs)。
|
||||
|
||||
|
@@ -1,86 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 🎁 Reference
|
||||
---
|
||||
|
||||
## 📍 `token`
|
||||
|
||||
Need to have the person token with push permission.
|
||||
|
||||
- [Personal token application](https://github.com/settings/tokens)
|
||||
- Need to check `Full control of private repositories`
|
||||
- Project add secrets
|
||||
- Select settings, select secrets, select `New repository secret`
|
||||
- `Name` is the same as in actions
|
||||
- `Value` fill in the token just applied by the individual
|
||||
|
||||
When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
|
||||
|
||||
## 📍 GitHub Docs
|
||||
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
||||
- [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||
|
||||
## 📍 `outputs` use
|
||||
|
||||
```yml
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1
|
||||
id: createissue
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Check outputs
|
||||
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
||||
```
|
||||
|
||||
More:
|
||||
|
||||
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||
|
||||
## 📍 `includes` check rules
|
||||
|
||||
```js
|
||||
"title-includes": 'x1,x2'
|
||||
|
||||
x1
|
||||
x2
|
||||
|
||||
"x1y3y2" true
|
||||
"y2 x1" true
|
||||
"x2" true
|
||||
"x3" false
|
||||
```
|
||||
|
||||
```js
|
||||
"title-includes": 'x1,x2/y1,y2'
|
||||
|
||||
x1 + y1
|
||||
x2 + y1
|
||||
x1 + y2
|
||||
x2 + y2
|
||||
|
||||
"x1y3y2" true
|
||||
"y2 x1" true
|
||||
"1x2y" false
|
||||
"x1" false
|
||||
```
|
||||
|
||||
## 📍 `emoji` Type
|
||||
|
||||
| content | emoji |
|
||||
| -- | -- |
|
||||
| `+1` | 👍 |
|
||||
| `-1` | 👎 |
|
||||
| `laugh` | 😄 |
|
||||
| `confused` | 😕 |
|
||||
| `heart` | ❤️ |
|
||||
| `hooray` | 🎉 |
|
||||
| `rocket` | 🚀 |
|
||||
| `eyes` | 👀 |
|
||||
|
||||
For details, please [view](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions).
|
||||
|
||||
## 📍 `comment-id`
|
||||
|
||||
Click the `···` icon in the upper right corner of a comment, select `Copy link`, and the number at the end of the url is `comment_id`.
|
||||
<embed src="../../../README.md#RE-/<wrapper reference [^>]*>([\s\S]*?)<\/wrapper>/"></embed>
|
||||
|
@@ -1,86 +1,5 @@
|
||||
---
|
||||
toc: menu
|
||||
title: 🎁 参 考
|
||||
---
|
||||
|
||||
## 📍 `token` 说明
|
||||
|
||||
需拥有 push 权限的人员 token。
|
||||
|
||||
- [个人 token 申请](https://github.com/settings/tokens)
|
||||
- 需勾选 `Full control of private repositories`
|
||||
- 项目添加 secrets
|
||||
- 选择 settings,选择 secrets,选择 `New repository secret`
|
||||
- `Name` 与 actions 中保持一致
|
||||
- `Value` 填写刚才个人申请的 token
|
||||
|
||||
当 actions 不填写 token 时,或输入 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)。
|
||||
|
||||
## 📍 GitHub 相关文档
|
||||
|
||||
- [GitHub Actions 语法](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
||||
- [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||
|
||||
## 📍 `outputs` 使用
|
||||
|
||||
```yml
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1
|
||||
id: createissue
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Check outputs
|
||||
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
||||
```
|
||||
|
||||
更多查看:
|
||||
|
||||
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||
|
||||
## 📍 `includes` 校验规则
|
||||
|
||||
```js
|
||||
"title-includes": 'x1,x2'
|
||||
|
||||
x1
|
||||
x2
|
||||
|
||||
"x1y3y2" true
|
||||
"y2 x1" true
|
||||
"x2" true
|
||||
"x3" false
|
||||
```
|
||||
|
||||
```js
|
||||
"title-includes": 'x1,x2/y1,y2'
|
||||
|
||||
x1 + y1
|
||||
x2 + y1
|
||||
x1 + y2
|
||||
x2 + y2
|
||||
|
||||
"x1y3y2" true
|
||||
"y2 x1" true
|
||||
"1x2y" false
|
||||
"x1" false
|
||||
```
|
||||
|
||||
## 📍 `emoji` 类型
|
||||
|
||||
| content | emoji |
|
||||
| -- | -- |
|
||||
| `+1` | 👍 |
|
||||
| `-1` | 👎 |
|
||||
| `laugh` | 😄 |
|
||||
| `confused` | 😕 |
|
||||
| `heart` | ❤️ |
|
||||
| `hooray` | 🎉 |
|
||||
| `rocket` | 🚀 |
|
||||
| `eyes` | 👀 |
|
||||
|
||||
如需详细了解,可 [查看](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions)。
|
||||
|
||||
## 📍 `comment-id`
|
||||
|
||||
点击某个评论右上角 `···` 图标,选择 `Copy link`,url 末尾数字即是 `comment_id`。
|
||||
<embed src="../../../README.zh-CN.md#RE-/<wrapper reference [^>]*>([\s\S]*?)<\/wrapper>/"></embed>
|
||||
|
@@ -1,4 +1,6 @@
|
||||
## Quick start
|
||||
---
|
||||
title: ⚡️ Quick start
|
||||
---
|
||||
|
||||
### 1. New Action
|
||||
|
||||
@@ -10,9 +12,9 @@ Click `New workflow` to add.
|
||||
|
||||

|
||||
|
||||
<Alert type="success">
|
||||
:::success{title="Tips"}
|
||||
You can click <Badge>set up a workflow yourself</Badge> to add a custom action, or you can apply a new action based on a template. <a target="_blank" href="https://github.com/actions-cool/.github">Templates</a>.
|
||||
</Alert>
|
||||
:::
|
||||
|
||||
### 2. Edit Action
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
## 快速开始
|
||||
---
|
||||
title: ⚡️ 快速开始
|
||||
---
|
||||
|
||||
### 1. 新建 Action
|
||||
|
||||
@@ -10,9 +12,9 @@
|
||||
|
||||

|
||||
|
||||
<Alert type="success">
|
||||
:::success{title="提示"}
|
||||
你可以点击 <Badge>set up a workflow yourself</Badge> 新增一个自定义 action,也可以根据模板来套用新增一个 action。<a target="_blank" href="https://github.com/actions-cool/.github">模板使用</a>。
|
||||
</Alert>
|
||||
:::
|
||||
|
||||
### 2. 编写 Action
|
||||
|
||||
|
@@ -3,22 +3,20 @@ title: Issues Helper
|
||||
order: 1
|
||||
hero:
|
||||
title: Issues Helper
|
||||
image: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ
|
||||
desc: 🤖 A GitHub Action that easily helps you automatically manage issues
|
||||
description: 🤖 A GitHub Action that easily helps you automatically manage issues
|
||||
actions:
|
||||
- text: Quick start
|
||||
link: /guide/start
|
||||
features:
|
||||
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*Km0BQJs7vWAAAAAAAAAAAAAAARQnAQ
|
||||
- emoji: 🎁
|
||||
title: Completely free
|
||||
desc: Use the Actions service provided by GitHub
|
||||
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*ELKWSIMizH0AAAAAAAAAAAAAARQnAQ
|
||||
description: Use the Actions service provided by GitHub
|
||||
- emoji: 👌
|
||||
title: Easy to use
|
||||
desc: Detailed tutorials and rich templates
|
||||
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*j-SURo-DkyIAAAAAAAAAAAAAARQnAQ
|
||||
description: Detailed tutorials and rich templates
|
||||
- emoji: 🌍
|
||||
title: Easy hosting
|
||||
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
|
||||
description: As long as GitHub is not down, it will not be affected
|
||||
---
|
||||
|
||||
## 🍭 Get started quickly
|
||||
|
@@ -3,22 +3,20 @@ title: Issues 助手
|
||||
order: 1
|
||||
hero:
|
||||
title: Issues 助手
|
||||
image: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ
|
||||
desc: 🤖 一个轻松帮你自动管理 issues 的 GitHub Action
|
||||
description: 🤖 一个轻松帮你自动管理 issues 的 GitHub Action
|
||||
actions:
|
||||
- text: 快速开始
|
||||
link: /zh-CN/guide/start
|
||||
features:
|
||||
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*Km0BQJs7vWAAAAAAAAAAAAAAARQnAQ
|
||||
- emoji: 🎁
|
||||
title: 完全免费
|
||||
desc: 使用 GitHub 自带提供的 Actions 服务
|
||||
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*ELKWSIMizH0AAAAAAAAAAAAAARQnAQ
|
||||
description: 使用 GitHub 自带提供的 Actions 服务
|
||||
- emoji: 👌
|
||||
title: 简单易用
|
||||
desc: 教程详细,模版丰富
|
||||
- icon: https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*j-SURo-DkyIAAAAAAAAAAAAAARQnAQ
|
||||
description: 教程详细,模版丰富
|
||||
- emoji: 🌍
|
||||
title: 轻松托管
|
||||
desc: 只要 GitHub 不宕机,它就不受影响
|
||||
footer: Open-source MIT Licensed | Copyright © 2020-present<br />Powered by xrkffgg
|
||||
description: 只要 GitHub 不宕机,它就不受影响
|
||||
---
|
||||
|
||||
## 🍭 快速上手
|
||||
|
100
web/remark-plugins/index.ts
Normal file
100
web/remark-plugins/index.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
import { unistUtilVisit } from 'dumi';
|
||||
|
||||
const WRAPPER_OPEN_TAG = '<wrapper';
|
||||
const WRAPPER_CLOSE_TAG = '</wrapper>';
|
||||
|
||||
function remarkPlugin(opt) {
|
||||
return (tree, vFile) => {
|
||||
unistUtilVisit.visit(tree, 'html', (node, index, parent) => {
|
||||
if (node.value.startsWith(WRAPPER_OPEN_TAG)) {
|
||||
// get attributes
|
||||
const attrMatch = node.value.match(/(\w+)=['"]([^'"]+)['"]/g);
|
||||
|
||||
// convert attributes to object
|
||||
const attrObj = attrMatch.reduce((acc, cur) => {
|
||||
const split = cur.split('=');
|
||||
const key = split[0].trim().replace(/['"]/g, '');
|
||||
const value = split[1].trim().replace(/['"]/g, '');
|
||||
|
||||
if (value.match(/^-?\d+$/)) {
|
||||
acc[key] = Number(value);
|
||||
} else {
|
||||
acc[key] = value;
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
// transform headings
|
||||
const depth = Number.isInteger(attrObj['depth']) ? attrObj['depth'] : 0;
|
||||
unistUtilVisit.visit(tree, 'heading', (node: any) => {
|
||||
node.depth = node.depth - depth;
|
||||
});
|
||||
|
||||
// transform links
|
||||
unistUtilVisit.visit(tree, 'link', (node, index, parent) => {
|
||||
/**
|
||||
* remove blacktop link
|
||||
* zh-CN: url="#列-表", en-US: url="#List"
|
||||
*/
|
||||
if (['#列-表', '#List'].includes(node.url)) {
|
||||
if (parent && typeof index === 'number') {
|
||||
parent.children.splice(
|
||||
index,
|
||||
1,
|
||||
// ...('children' in node ? node.children : []) // 不需要保留子节点
|
||||
);
|
||||
}
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* redirect:
|
||||
* 1. token 说明
|
||||
*/
|
||||
if (node.url === '#token') {
|
||||
node.url = `./guide/ref${node.url}`;
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
|
||||
if (['#emoji-类型', '#emoji-types'].includes(node.url)) {
|
||||
node.url = `./guide/ref${node.url}`;
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
|
||||
if (node.url === '#github-docs') {
|
||||
node.url = `./guide/ref${node.url}`;
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
|
||||
if (['#outputs-使用', '#outputs-use'].includes(node.url)) {
|
||||
node.url = `./guide/ref${node.url}`;
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
|
||||
if (['#校验规则', '#check-rules'].includes(node.url)) {
|
||||
node.url = `./guide/ref${node.url}`;
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
|
||||
if (node.url === '#comment-id') {
|
||||
node.url = `./guide/ref${node.url}`;
|
||||
return unistUtilVisit.CONTINUE;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
(node.value === WRAPPER_CLOSE_TAG || node.value.startsWith(WRAPPER_OPEN_TAG)) &&
|
||||
parent &&
|
||||
typeof index === 'number'
|
||||
) {
|
||||
if (parent && typeof index === 'number') {
|
||||
parent.children.splice(index, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export default remarkPlugin;
|
Reference in New Issue
Block a user