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

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
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
assigneesDesignated person. No operation when no input or empty characterstring
random-toWhen set, it will be randomly selected in assigneesnumber
  • 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.event.issue.number }} is the current issue. More references
  • 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.

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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
labelsNew labels. When it is not filled in or is empty character, do not addstring
  • labels support multiple and separated by comma

close-issue

Close the specified issue.

- name: Close issue
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
close-reasonReason for closing. Default not_planned, another completedstring

create-comment

When a designated label is added, comment on the issue.

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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
bodyAdd comment contentstring
emojiAdd emojistring
  • No action when body is empty
  • Return comment-id, which can be used for subsequent operations. Usage reference
  • ${{ 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.

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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
titleThe title of the new issuestring
bodyThe body of the new issuestring
labelsThe labels for the new issuestring
assigneesThe assignees for the new issuestring
random-toWhen set, it will be randomly selected in assigneesnumber
emojiAdd emojistring

create-label

Create label. If you want to maintain labels in batches, see.

- 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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
label-nameLabel name, emoji supportstring
label-colorLabel color, the format is hexadecimal color code, without #string
label-descLabel descriptionstring
  • label-name: If it already exists, no operation
  • label-color: Default is ededed

delete-comment

According to comment-id delete the specified comment.

- name: Delete comment
uses: actions-cool/issues-helper@v3
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: xxx
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
comment-idThe comment IDnumber

get-issue

Query issue information.

- name: Get Issue
uses: actions-cool/issues-helper@v3
with:
actions: 'get-issue'
token: ${{ secrets.GITHUB_TOKEN }}
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
  • Return issue-number issue-title issue-body issue-labels issue-assignees issue-state. Usage reference

lock-issue

When the invalid label is added, the issue is locked.

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 }}
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
lock-reasonReason for locking issuestring
  • lock-reason: Optional values are off-topic too heated resolved spam

open-issue

Open the specified issue.

- name: Open issue
uses: actions-cool/issues-helper@v3
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber

remove-assignees

Remove the person designated by issue.

- 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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
assigneesDesignated person removed. When it is an empty character, do not removestring

remove-labels

Remove the specified labels.

- 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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
labelsThe removed labels. When it is a blank character, do not removestring
  • 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.

- 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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
labelslabels set. When empty characters, will remove allstring

unlock-issue

Unlock the specified issue.

- name: Unlock issue
uses: actions-cool/issues-helper@v3
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber

update-comment

Update the specified comment according to comment-id.

The following example shows that 👀 is added for each new comment.

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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
comment-idThe comment IDnumber
out-commentsThe output of find-comments, if you find multiple, operate multiplestring
bodyUpdate the content of commentstring
update-modeUpdate mode. Default replace, another appendstring
emojiAdd emojistring
  • 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.

- 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'
ParamDescTypeRequired
actionsAction typestring
tokenToken explainstring
issue-numberThe number of issue. When not input, it will be obtained from the trigger eventnumber
stateModify the status of issue, optional value open closedstring
titleModify the title of the issuestring
bodyModify the content of issuestring
update-modeUpdate mode. Default replace, another appendstring
labelsReplace the labels of issuestring
assigneesReplace the assignees of issuestring
emojiAdd emojistring
  • state defaults to open
  • When the option is not filled, it will keep the original