mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 10:15:59 +08:00
1256 lines
42 KiB
Markdown
1256 lines
42 KiB
Markdown
<p align="center">
|
|
<a href="https://actions-cool.github.io/issues-helper/">
|
|
<img width="200" src="https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ">
|
|
</a>
|
|
</p>
|
|
|
|
<h1 align="center">🤖 Issues Helper</h1>
|
|
|
|
<div align="center">
|
|
|
|
A GitHub Action that easily helps you automatically manage issues
|
|
|
|
[](https://github.com/actions-cool/issues-helper/actions)
|
|
[](https://github.com/marketplace/actions/issues-helper)
|
|

|
|
[](https://github.com/umijs/dumi)
|
|
[](https://github.com/prettier/prettier)
|
|
|
|
[](https://github.com/actions-cool/issues-helper/stargazers)
|
|
[](https://github.com/actions-cool/issues-helper/releases)
|
|
[](https://github.com/actions-cool/issues-helper/discussions)
|
|
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
|
|
|
</div>
|
|
|
|
English | [简体中文](README.zh-CN.md)
|
|
|
|
## 🔗 Link
|
|
|
|
- [Online documentation](https://actions-cool.github.io/issues-helper)
|
|
- [Online v2 documentation](https://actions-cool.github.io/issues-helper-2.x/)
|
|
- [Changelog](./CHANGELOG.md)
|
|
|
|
## 😎 Why use GitHub Action?
|
|
|
|
1. Complete free
|
|
2. Fully automatic
|
|
3. Hosted on the GitHub server, as long as GitHub is not down, it is not affected
|
|
|
|
> Private projects have a limit of 2000 times per month. [Specific view](https://github.com/settings/billing). Public are unlimited.
|
|
|
|
## Who is using?
|
|
|
|
Please leave a message at [**here**](https://github.com/actions-cool/issues-helper/issues/6).
|
|
|
|
<table>
|
|
<tr>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/ant-design/ant-design">
|
|
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/ant-design-blazor/ant-design-blazor">
|
|
<img src="https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<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/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>
|
|
</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"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/electron/electron">
|
|
<img src="https://avatars.githubusercontent.com/u/13409222?s=200&v=4" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/element-plus/element-plus">
|
|
<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>
|
|
<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"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/mui/material-ui">
|
|
<img src="https://avatars.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/TuSimple/naive-ui">
|
|
<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>
|
|
<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"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/react-component">
|
|
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/lijinke666/react-music-player">
|
|
<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>
|
|
<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"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/umijs/umi">
|
|
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/vitejs/vite">
|
|
<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>
|
|
<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"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/vuepress/vuepress-next">
|
|
<img src="https://v2.vuepress.vuejs.org/images/hero.png" width="46"/>
|
|
</a>
|
|
</td>
|
|
<td align="center" width="180">
|
|
<a href="https://github.com/zoo-js/zoo">
|
|
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
|
|
</a>
|
|
</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>
|
|
</tr>
|
|
</table>
|
|
|
|
## Badge
|
|
|
|
If you think `actions-cool` can help you, please copy it to the README to support promotion and bring convenience to more repositories:[](https://github.com/actions-cool). [More color see](https://github.com/actions-cool/issues-helper/issues/92).
|
|
|
|
```
|
|
[](https://github.com/actions-cool)
|
|
```
|
|
|
|
## ⚡ Feedback
|
|
|
|
You are very welcome to try it out and put forward your comments. You can use the following methods:
|
|
|
|
- Report bugs or consult with [Issue](https://github.com/actions-cool/issues-helper/issues)
|
|
- Discuss via [Discussions](https://github.com/actions-cool/issues-helper/discussions)
|
|
- Submit [Pull Request](https://github.com/actions-cool/issues-helper/pulls) to improve the code of `issues-helper`
|
|
|
|
## List
|
|
|
|
When the following list does not have the features you want, you can submit it in [issues](https://github.com/actions-cool/issues-helper/issues).
|
|
|
|
- ⭐ Base
|
|
- [`add-assignees`](#add-assignees)
|
|
- [`add-labels`](#add-labels)
|
|
- [`close-issue`](#close-issue)
|
|
- [`create-comment`](#create-comment)
|
|
- [`create-issue`](#create-issue)
|
|
- [`create-label`](#create-label)
|
|
- [`delete-comment`](#delete-comment)
|
|
- [`get-issue`](#get-issue)
|
|
- [`lock-issue`](#lock-issue)
|
|
- [`open-issue`](#open-issue)
|
|
- [`remove-assignees`](#remove-assignees)
|
|
- [`remove-labels`](#remove-labels)
|
|
- [`set-labels`](#set-labels)
|
|
- [`unlock-issue`](#unlock-issue)
|
|
- [`update-comment`](#update-comment)
|
|
- [`update-issue`](#update-issue)
|
|
- 🌟 Advanced
|
|
- [`check-inactive`](#check-inactive)
|
|
- [`check-issue`](#check-issue)
|
|
- [`close-issues`](#close-issues)
|
|
- [`find-comments`](#find-comments)
|
|
- [`find-issues`](#find-issues)
|
|
- [`lock-issues`](#lock-issues)
|
|
- [`mark-assignees`](#mark-assignees)
|
|
- [`mark-duplicate`](#mark-duplicate)
|
|
- [`welcome`](#welcome)
|
|
|
|
## 🚀 Usage
|
|
|
|
### ⭐ 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](#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](#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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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 | ✖ |
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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](#emoji-types) | string | ✖ |
|
|
|
|
- No action when `body` is empty
|
|
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](#outputs-use)
|
|
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
|
|
- `emoji` support multiple and separated by comma
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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](#emoji-types) | string | ✖ |
|
|
|
|
- No action when `title` is empty
|
|
- Return `issue-number`. [Usage reference](#outputs-use)
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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`
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `delete-comment`
|
|
|
|
According to [`comment-id`](#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](#token) | string | ✖ |
|
|
| comment-id | The comment ID | number | ✔ |
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#token) | string | ✖ |
|
|
|
|
- Return `issue-number` `issue-title` `issue-body` `issue-labels` `issue-assignees` `issue-state`. [Usage reference](#outputs-use)
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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`
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#token) | string | ✖ |
|
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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 | ✔ |
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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 | ✔ |
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#token) | string | ✖ |
|
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `update-comment`
|
|
|
|
Update the specified comment according to [`comment-id`](#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](#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 [reaction](#emoji-types) | 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`
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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 [reaction](#emoji-types) | string | ✖ |
|
|
|
|
- `state` defaults to `open`
|
|
- When the option is not filled, it will keep the original
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
### 🌟 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](#token) | string | ✖ |
|
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
|
| emoji | Add [reaction](#emoji-types) 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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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](#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'`
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#token) | string | ✖ |
|
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
|
| emoji | Add [reaction](#emoji-types) 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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `find-issues`
|
|
|
|
Find the current repository, the creator is k , the title contains `this` , the body contains `that`, and the list of issues in the open state.
|
|
|
|
```yml
|
|
- name: Find issues
|
|
uses: actions-cool/issues-helper@v3
|
|
with:
|
|
actions: 'find-issues'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
issue-creator: 'k'
|
|
issue-state: 'open'
|
|
title-includes: 'this'
|
|
body-includes: 'that'
|
|
labels: 'documentation'
|
|
```
|
|
|
|
| Param | Desc | Type | Required |
|
|
| -- | -- | -- | -- |
|
|
| actions | Action type | string | ✔ |
|
|
| token | [Token explain](#token) | string | ✖ |
|
|
| issue-state | State filtering | string | ✖ |
|
|
| issue-creator | Creator filtering | string | ✖ |
|
|
| title-includes | Title filtering | string | ✖ |
|
|
| body-includes | Body filtering | string | ✖ |
|
|
| labels | Labels 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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#token) | string | ✖ |
|
|
| body | When operating an issue, you can comment. Do not comment when not typing | string | ✖ |
|
|
| emoji | Add [reaction](#emoji-types) 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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `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](#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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `mark-duplicate`
|
|
|
|
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
|
|
|
```yml
|
|
name: Issue Mark Duplicate
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created, edited]
|
|
|
|
jobs:
|
|
mark-duplicate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: mark-duplicate
|
|
uses: actions-cool/issues-helper@v3
|
|
with:
|
|
actions: 'mark-duplicate'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
```
|
|
|
|
| Param | Desc | Type | Required |
|
|
| -- | -- | -- | -- |
|
|
| actions | Action type | string | ✔ |
|
|
| token | [Token explain](#token) | string | ✖ |
|
|
| duplicate-command | Simple commands can be set, such as: `/d` | string | ✖ |
|
|
| duplicate-labels | Add additional labels to this issue | string | ✖ |
|
|
| remove-labels | Set removable labels | string | ✖ |
|
|
| labels | Replace the labels of the issue | string | ✖ |
|
|
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
|
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
|
| 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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
#### `welcome`
|
|
|
|
When an issue is created, the user who created the issue for the first time is welcome.
|
|
|
|
If the user is not creating for the first time, there is no operation.
|
|
|
|
```yml
|
|
name: Issue Welcome
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
issue-welcome:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: welcome
|
|
uses: actions-cool/issues-helper@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](#token) | string | ✖ |
|
|
| body | Comment on the welcome content, no comment if you leave it blank | string | ✖ |
|
|
| labels | Add labels to this issue | string | ✖ |
|
|
| assignees | Add assignees to this issue | string | ✖ |
|
|
| issue-emoji | Add [reaction](#emoji-types) to this issue| string | ✖ |
|
|
|
|
- If these 4 options are not filled, no operation
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
## 🎁 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).
|
|
|
|
⏫ [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)
|
|
|
|
### `outputs` use
|
|
|
|
```yml
|
|
- name: Create issue
|
|
uses: actions-cool/issues-helper@v3
|
|
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
|
|
|
|
⏫ [Back to list](#List)
|
|
|
|
### 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
|
|
```
|
|
|
|
⏫ [Back to list](#List)
|
|
### Emoji types
|
|
|
|
| content | emoji |
|
|
| -- | -- |
|
|
| `+1` | 👍 |
|
|
| `-1` | 👎 |
|
|
| `laugh` | 😄 |
|
|
| `confused` | 😕 |
|
|
| `heart` | ❤️ |
|
|
| `hooray` | 🎉 |
|
|
| `rocket` | 🚀 |
|
|
| `eyes` | 👀 |
|
|
|
|
⏫ [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)
|
|
|
|
## Actions Template
|
|
|
|
- You can directly use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repositorie template
|
|
- Personal exercises and tests [Actions](https://github.com/actions-cool/test-issues-helper) repository
|
|
- Can also refer to the warehouse of [online users](#who-is-using)
|
|
|
|
## LICENSE
|
|
|
|
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|