🌟 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.

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
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
bodyWhen operating an issue, you can comment. Do not comment when not typingstringβœ–
contentsAdd reaction for this commentstringβœ–
labelsLabels filteringstringβœ–
issue-stateState filteringstringβœ–
issue-assigneeAssignee filteringstringβœ–
issue-creatorCreator filteringstringβœ–
issue-mentionedMentioned filteringstringβœ–
body-includesBody filteringstringβœ–
title-includesTitle filteringstringβœ–
inactive-dayInactive days filteringnumberβœ–
inactive-labelThe label name addingstringβœ–
exclude-labelsExclude labels filteringstringβœ–
  • 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

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'
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumberβœ–
assignee-includesAssignees contains checkstringβœ–
title-includesTitle contains checkstringβœ–
title-excludesCheck whether the title is empty after removing the default titlestringβœ–
body-includesBody contains checkstringβœ–
  • 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.

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
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
bodyWhen operating an issue, you can comment. Do not comment when not typingstringβœ–
contentsAdd reaction for this commentstringβœ–
labelsLabels filteringstringβœ–
issue-assigneeAssignee filteringstringβœ–
issue-creatorCreator filteringstringβœ–
issue-mentionedMentioned filteringstringβœ–
body-includesBody filteringstringβœ–
title-includesTitle filteringstringβœ–
inactive-dayInactive days filteringnumberβœ–
exclude-labelsExclude labels filteringstringβœ–
close-reasonReason for closing. Default not_planned, another completedstringβœ–
  • 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.

- 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'
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumberβœ–
comment-authComment creator, all will be queried if not filledstringβœ–
body-includesComment content includes filtering, no verification if not filledstringβœ–
directionReturn comments sortstringβœ–
  • Return 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 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.

- 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'
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
issue-stateState filteringstringβœ–
issue-creatorCreator filteringstringβœ–
title-includesTitle filteringstringβœ–
body-includesBody filteringstringβœ–
exclude-labelsExclude labels filteringstringβœ–
inactive-dayInactive days filteringnumberβœ–
directionReturn sortstringβœ–
  • Returns 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 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.

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
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
bodyWhen operating an issue, you can comment. Do not comment when not typingstringβœ–
contentsAdd reaction for this commentstringβœ–
labelsLabels filteringstringβœ–
issue-stateState filteringstringβœ–
issue-assigneeAssignee filteringstringβœ–
issue-creatorCreator filteringstringβœ–
issue-mentionedMentioned filteringstringβœ–
body-includesBody filteringstringβœ–
title-includesTitle filteringstringβœ–
inactive-dayInactive days filteringnumberβœ–
lock-reasonReason for locking issuestringβœ–
exclude-labelsExclude labels filteringstringβœ–
  • 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.

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 }}
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
assign-commandSimple commands can be set, such as: /astringβœ–
require-permissionPermission required, default is writestringβœ–
  • 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.

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 }}
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
duplicate-commandSimple commands can be set, such as: /dstringβœ–
duplicate-labelsAdd additional labels to this issuestringβœ–
remove-labelsSet removable labelsstringβœ–
labelsReplace the labels of the issuestringβœ–
emojiAdd emoji for this commentstringβœ–
close-issueWhether to close the issue at the same timestringβœ–
require-permissionPermission required, default is writestringβœ–
close-reasonReason for closing. Default not_planned, another completedstringβœ–
  • 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
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.

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.

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'
ParamDescTypeRequired
actionsAction typestringβœ”
tokenToken explainstringβœ–
bodyComment on the welcome content, no comment if you leave it blankstringβœ–
labelsAdd labels to this issuestringβœ–
assigneesAdd assignees to this issuestringβœ–
issue-emojiAdd emoji to this issuestringβœ–
  • If these 4 options are not filled, no operation