Advanced usage is not recommended to use multiple actions at the same time.
check-inactiveAt 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.
name: Check inactiveon:schedule:- cron: "0 0 1 * *"jobs:check-inactive:runs-on: ubuntu-lateststeps:- name: check-inactiveuses: actions-cool/issues-helper@v3with:actions: 'check-inactive'token: ${{ secrets.GITHUB_TOKEN }}inactive-day: 30
| Param | Desc | Type | Required |
|---|---|---|---|
| actions | Action type | string | β |
| token | Token explain | string | β |
| body | When operating an issue, you can comment. Do not comment when not typing | string | β |
| contents | Add reaction 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, allissue-state: The default is all. Optional value open closed, when these 2 items are not, both are allissue-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 addedinactive-day: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, allinactive-label: The default is inactive, others can be customized. When the project does not contain the label, it will be created automaticallyexclude-labels: When set to include $exclude-empty, no label issue can be excludedcheck-issueCheck 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.
name: Check Issueon:issues:types: [edited]jobs:check-issue:runs-on: ubuntu-lateststeps:- name: check-issueuses: actions-cool/issues-helper@v3with: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 | 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 levelscheck-result, due to yml reasons, the judgment condition is if: steps.xxid.outputs.check-result =='true'close-issuesEvery 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.
name: Check need infoon:schedule:- cron: "0 0 */7 * *"jobs:check-need-info:runs-on: ubuntu-lateststeps:- name: close-issuesuses: actions-cool/issues-helper@v3with:actions: 'close-issues'token: ${{ secrets.GITHUB_TOKEN }}labels: 'need info'inactive-day: 7
| Param | Desc | Type | Required |
|---|---|---|---|
| actions | Action type | string | β |
| token | Token explain | string | β |
| body | When operating an issue, you can comment. Do not comment when not typing | string | β |
| contents | Add reaction 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, allissue-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 addedinactive-day: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, allexclude-labels: When set to include $exclude-empty, no label issue can be excludedfind-commentsFind the current warehouse issue No. 1, the creator is k and the content contains the comment list of this.
- name: Find commentsuses: actions-cool/issues-helper@v3with:actions: 'find-comments'token: ${{ secrets.GITHUB_TOKEN }}issue-number: 1comment-auth: 'k'body-includes: 'this'
| Param | Desc | Type | Required |
|---|---|---|---|
| actions | Action type | string | β |
| token | Token explain | 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 | β |
comments in the following format:[{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 returnedcreated updated in the returned array, determined by the environment, will be UTC +0find-issuesFind the current repository, the creator is k , the title contains this , the body contains that, and the list of issues in the open state.
- name: Find issuesuses: actions-cool/issues-helper@v3with: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 | 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 | β |
issues in the following format:[{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 returnedcreated updated in the returned array, determined by the environment, will be UTC +0exclude-labels: When set to include $exclude-empty, no label issue can be excludedlock-issuesEvery 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.
name: Lock inactive issueson:schedule:- cron: "0 0 1 */3 *"jobs:lock-issues:runs-on: ubuntu-lateststeps:- name: lock-issuesuses: actions-cool/issues-helper@v3with:actions: 'lock-issues'token: ${{ secrets.GITHUB_TOKEN }}labels: 'inactive'inactive-day: 128
| Param | Desc | Type | Required |
|---|---|---|---|
| actions | Action type | string | β |
| token | Token explain | string | β |
| body | When operating an issue, you can comment. Do not comment when not typing | string | β |
| contents | Add reaction 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, allissue-state: The default is all. Optional value open closed, when these 2 items are not, both are allissue-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 addedinactive-day: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, allexclude-labels: When set to include $exclude-empty, no label issue can be excludedmark-assigneesQuickly assign person, only for the issue to add editor comments.
name: Issue Mark Assigneeson:issue_comment:types: [created, edited]jobs:mark-assignees:runs-on: ubuntu-lateststeps:- name: mark-assigneesuses: actions-cool/issues-helper@v3with:actions: 'mark-assignees'token: ${{ secrets.GITHUB_TOKEN }}
| Param | Desc | Type | Required |
|---|---|---|---|
| actions | Action type | string | β |
| token | Token explain | string | β |
| assign-command | Simple commands can be set, such as: /a | string | β |
| require-permission | Permission required, default is write | string | β |
assign-command: default /assignrequire-permission: Optional values are admin, write, read, noneread permission, it is readread permission, it is readread permissionwrite, admin and write meet the conditionsmark-duplicateQuickly mark duplicate questions, only for issue new comments or edit comments.
name: Issue Mark Duplicateon:issue_comment:types: [created, edited]jobs:mark-duplicate:runs-on: ubuntu-lateststeps:- name: mark-duplicateuses: actions-cool/issues-helper@v3with:actions: 'mark-duplicate'token: ${{ secrets.GITHUB_TOKEN }}
| Param | Desc | Type | Required |
|---|---|---|---|
| actions | Action type | string | β |
| token | Token explain | 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 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 priorityclose-issue: Both true or 'true' can take effectrequire-permission: Optional values are admin, write, read, noneread permission, it is readread permission, it is readread permissionwrite, admin and write meet the conditionstoggle-labelsWhen an issue is reopened, the set labels are removed if they already exist, otherwise they are added.
name: Toggle Labelson:issues:types: [reopened]jobs:toggle-labels:runs-on: ubuntu-lateststeps:- name: Toggle labelsuses: actions-cool/issues-helper@v3with: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 | 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 | β |
welcomeWhen 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.
name: Issue Welcomeon:issues:types: [opened]jobs:issue-welcome:runs-on: ubuntu-lateststeps:- name: welcomeuses: actions-cool/issues-helper@v3with: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 | 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 to this issue | string | β |