mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-10-13 23:33:51 +08:00
feat: add random to (#35)
* feat: add random to * add actions * up * up version * add less
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## v1.9
|
||||||
|
|
||||||
|
`2021.01.11`
|
||||||
|
|
||||||
|
- feat: add random to. [#35](https://github.com/actions-cool/issues-helper/pull/35)
|
||||||
|
|
||||||
## v1.8
|
## v1.8
|
||||||
|
|
||||||
`2021.01.07`
|
`2021.01.07`
|
||||||
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020 xrkffgg
|
Copyright (c) 2020-present xrkffgg
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@@ -134,12 +134,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
assignees: 'xxx' or 'xx1,xx2'
|
assignees: 'xxx' or 'xx1,xx2'
|
||||||
|
random-to: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
@@ -148,6 +149,7 @@ jobs:
|
|||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue | number | ✔ |
|
||||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
| 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`
|
- `actions` support multiple and separated by comma. Like: `add-assignees,add-labels`
|
||||||
- The `name` can be modified according to the actual situation
|
- The `name` can be modified according to the actual situation
|
||||||
@@ -174,7 +176,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -199,7 +201,7 @@ Close the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -232,7 +234,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -276,7 +278,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -295,6 +297,7 @@ jobs:
|
|||||||
| body | The body of the new issue | string | ✖ |
|
| body | The body of the new issue | string | ✖ |
|
||||||
| labels | The labels for the new issue | string | ✖ |
|
| labels | The labels for the new issue | string | ✖ |
|
||||||
| assignees | The assignees 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 | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
||||||
|
|
||||||
- `title` default is `Default Title`
|
- `title` default is `Default Title`
|
||||||
@@ -308,7 +311,7 @@ According to [`comment-id`](#comment-id) delete the specified comment.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -340,7 +343,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -371,7 +374,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -399,7 +402,7 @@ Open the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -420,7 +423,7 @@ Remove the person designated by issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -443,7 +446,7 @@ Remove the specified labels.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -468,7 +471,7 @@ Replace the labels of issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -491,7 +494,7 @@ Unlock the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -524,7 +527,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -552,7 +555,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -602,7 +605,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -645,7 +648,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -698,7 +701,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -737,7 +740,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -771,7 +774,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -819,7 +822,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -865,7 +868,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -908,7 +911,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'watch'
|
if: github.event.label.name == 'watch'
|
||||||
steps:
|
steps:
|
||||||
- name: find comments
|
- name: find comments
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
id: fcid
|
id: fcid
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
@@ -919,7 +922,7 @@ jobs:
|
|||||||
|
|
||||||
- name: create comment
|
- name: create comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -928,7 +931,7 @@ jobs:
|
|||||||
|
|
||||||
- name: update comment
|
- name: update comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -960,7 +963,7 @@ When the token is not filled in actions or the corresponding secrets are not add
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
id: createissue
|
id: createissue
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
|
55
README.md
55
README.md
@@ -134,12 +134,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
assignees: 'xxx' or 'xx1,xx2'
|
assignees: 'xxx' or 'xx1,xx2'
|
||||||
|
random-to: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
@@ -148,6 +149,7 @@ jobs:
|
|||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue | number | ✔ |
|
||||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||||
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
|
|
||||||
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
||||||
- 其中的 `name` 可根据自行根据实际情况修改
|
- 其中的 `name` 可根据自行根据实际情况修改
|
||||||
@@ -174,7 +176,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -199,7 +201,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -232,7 +234,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -276,7 +278,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -295,6 +297,7 @@ jobs:
|
|||||||
| body | 新增 issue 的内容 | string | ✖ |
|
| body | 新增 issue 的内容 | string | ✖ |
|
||||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||||
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
| contents | 为新增 issue 增加 [reaction](#reactions-types) | string | ✖ |
|
| contents | 为新增 issue 增加 [reaction](#reactions-types) | string | ✖ |
|
||||||
|
|
||||||
- `title` 默认为:`Default Title`
|
- `title` 默认为:`Default Title`
|
||||||
@@ -308,7 +311,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -340,7 +343,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -371,7 +374,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -399,7 +402,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -420,7 +423,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -443,7 +446,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -468,7 +471,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -491,7 +494,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -524,7 +527,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -552,7 +555,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -600,7 +603,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -643,7 +646,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -692,7 +695,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -731,7 +734,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -765,7 +768,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -813,7 +816,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -859,7 +862,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -902,7 +905,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'watch'
|
if: github.event.label.name == 'watch'
|
||||||
steps:
|
steps:
|
||||||
- name: find comments
|
- name: find comments
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
id: fcid
|
id: fcid
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
@@ -913,7 +916,7 @@ jobs:
|
|||||||
|
|
||||||
- name: create comment
|
- name: create comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -922,7 +925,7 @@ jobs:
|
|||||||
|
|
||||||
- name: update comment
|
- name: update comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -954,7 +957,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
id: createissue
|
id: createissue
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
|
@@ -20,6 +20,8 @@ inputs:
|
|||||||
description: 'Issue title'
|
description: 'Issue title'
|
||||||
assignees:
|
assignees:
|
||||||
description: 'Issue assignees'
|
description: 'Issue assignees'
|
||||||
|
random-to:
|
||||||
|
description: 'Issue assignees random to'
|
||||||
labels:
|
labels:
|
||||||
description: 'Issue labels'
|
description: 'Issue labels'
|
||||||
state:
|
state:
|
||||||
|
1612
dist/index.js
vendored
1612
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -142,7 +142,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -188,7 +188,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -232,7 +232,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -106,7 +106,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -138,7 +138,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -184,7 +184,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -228,7 +228,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -22,12 +22,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
assignees: 'xxx' or 'xx1,xx2'
|
assignees: 'xxx' or 'xx1,xx2'
|
||||||
|
random-to: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
@@ -36,6 +37,7 @@ jobs:
|
|||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue | number | ✔ |
|
||||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
| 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`
|
- `actions` support multiple and separated by comma. Like: `add-assignees,add-labels`
|
||||||
- The `name` can be modified according to the actual situation
|
- The `name` can be modified according to the actual situation
|
||||||
@@ -60,7 +62,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -83,7 +85,7 @@ Close the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -114,7 +116,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -156,7 +158,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -175,6 +177,7 @@ jobs:
|
|||||||
| body | The body of the new issue | string | ✖ |
|
| body | The body of the new issue | string | ✖ |
|
||||||
| labels | The labels for the new issue | string | ✖ |
|
| labels | The labels for the new issue | string | ✖ |
|
||||||
| assignees | The assignees 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 | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
||||||
|
|
||||||
- `title` default is `Default Title`
|
- `title` default is `Default Title`
|
||||||
@@ -186,7 +189,7 @@ According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified c
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -216,7 +219,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -245,7 +248,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -277,7 +280,7 @@ Open the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -296,7 +299,7 @@ Remove the person designated by issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -317,7 +320,7 @@ Remove the specified labels.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -340,7 +343,7 @@ Replace the labels of issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -361,7 +364,7 @@ Unlock the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -392,7 +395,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -418,7 +421,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -466,7 +469,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
35
docs/base.md
35
docs/base.md
@@ -22,12 +22,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
assignees: 'xxx' or 'xx1,xx2'
|
assignees: 'xxx' or 'xx1,xx2'
|
||||||
|
random-to: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
@@ -36,6 +37,7 @@ jobs:
|
|||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue | number | ✔ |
|
||||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||||
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
|
|
||||||
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
||||||
- 其中的 `name` 可根据自行根据实际情况修改
|
- 其中的 `name` 可根据自行根据实际情况修改
|
||||||
@@ -60,7 +62,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -83,7 +85,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -114,7 +116,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -156,7 +158,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -175,6 +177,7 @@ jobs:
|
|||||||
| body | 新增 issue 的内容 | string | ✖ |
|
| body | 新增 issue 的内容 | string | ✖ |
|
||||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||||
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
| contents | 为新增 issue 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| contents | 为新增 issue 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
||||||
|
|
||||||
- `title` 默认为:`Default Title`
|
- `title` 默认为:`Default Title`
|
||||||
@@ -186,7 +189,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -216,7 +219,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -245,7 +248,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -277,7 +280,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -296,7 +299,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -317,7 +320,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -340,7 +343,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -361,7 +364,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -392,7 +395,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -418,7 +421,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -465,7 +468,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -37,3 +37,8 @@ At the same time, the output is also in string format
|
|||||||
When an action is set, such as adding a label `x1` to an issue, Actions will automatically add a label `x2` to the issue.
|
When an action is set, such as adding a label `x1` to an issue, Actions will automatically add a label `x2` to the issue.
|
||||||
|
|
||||||
But if this is done by `GitHub Actions bot` (that is, the token in the actions is not passed, or the default `token: ${{ secrets.GITHUB_TOKEN }}` is used), the actions of label `x2` will not be triggered.
|
But if this is done by `GitHub Actions bot` (that is, the token in the actions is not passed, or the default `token: ${{ secrets.GITHUB_TOKEN }}` is used), the actions of label `x2` will not be triggered.
|
||||||
|
|
||||||
|
## `assignees` scope
|
||||||
|
|
||||||
|
- The owner or collaborator of the warehouse, if there is an organization, including members
|
||||||
|
- Participants of the issue, including creators and commenters
|
||||||
|
@@ -38,3 +38,8 @@ with:
|
|||||||
当设置了一个 Actions,如为给一个 issue 新增 label `x1` 时,Actions 自动为该 issue 增加 `x2` label。
|
当设置了一个 Actions,如为给一个 issue 新增 label `x1` 时,Actions 自动为该 issue 增加 `x2` label。
|
||||||
|
|
||||||
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
|
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
|
||||||
|
|
||||||
|
## `assignees` 范围
|
||||||
|
|
||||||
|
- 仓库的所有者或协作者,若有组织,包括成员
|
||||||
|
- issue 的参与者,包括创建者、评论者
|
||||||
|
@@ -38,7 +38,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -38,7 +38,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v1.8
|
uses: actions-cool/issues-helper@v1.9
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "issue-helper",
|
"name": "issue-helper",
|
||||||
"version": "1.7.0",
|
"version": "1.9.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Some operations on issue.",
|
"description": "Some operations on issue.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"package": "ncc build src/main.js -o dist",
|
"package": "ncc build src/main.js -o dist",
|
||||||
"users": "node ./script/update-users.js",
|
"users": "node ./script/update-users.js",
|
||||||
"main": "node ./src/main.js",
|
"main": "node ./src/main.js",
|
||||||
"version": "node ./script/update-version.js"
|
"ver": "node ./script/update-version.js"
|
||||||
},
|
},
|
||||||
"author": "xrkffgg",
|
"author": "xrkffgg",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -32,7 +32,8 @@
|
|||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
"@octokit/rest": "^18.0.12",
|
"@octokit/rest": "^18.0.12",
|
||||||
"dayjs": "^1.9.7"
|
"dayjs": "^1.9.7",
|
||||||
|
"lodash": "^4.17.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vercel/ncc": "^0.25.1",
|
"@vercel/ncc": "^0.25.1",
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { readFileSync, writeFileSync } = require('fs');
|
const { readFileSync, writeFileSync } = require('fs');
|
||||||
|
|
||||||
const last = /v1\.7/g;
|
const last = /v1\.8/g;
|
||||||
const now = 'v1.8';
|
const now = 'v1.9';
|
||||||
|
|
||||||
let readme = readFileSync('./README.md', 'utf-8');
|
let readme = readFileSync('./README.md', 'utf-8');
|
||||||
readme = readme.replace(last, now);
|
readme = readme.replace(last, now);
|
||||||
|
@@ -17,7 +17,7 @@ const {
|
|||||||
} = require('./public.js');
|
} = require('./public.js');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
dealInput,
|
dealStringToArr,
|
||||||
matchKeyword,
|
matchKeyword,
|
||||||
getPreMonth
|
getPreMonth
|
||||||
} = require('./util.js');
|
} = require('./util.js');
|
||||||
@@ -83,7 +83,7 @@ async function doCheckIssue (owner, repo, issueNumber) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!!checkResult && assigneeIncludes) {
|
if (!!checkResult && assigneeIncludes) {
|
||||||
let assigneesCheck = dealInput(assigneeIncludes);
|
let assigneesCheck = dealStringToArr(assigneeIncludes);
|
||||||
let checkAssignee = false;
|
let checkAssignee = false;
|
||||||
issue.data.assignees.forEach(it => {
|
issue.data.assignees.forEach(it => {
|
||||||
if (checkResult && !checkAssignee && assigneesCheck.includes(it.login)) {
|
if (checkResult && !checkAssignee && assigneesCheck.includes(it.login)) {
|
||||||
@@ -96,8 +96,8 @@ async function doCheckIssue (owner, repo, issueNumber) {
|
|||||||
|
|
||||||
if (!!checkResult && titleIncludes) {
|
if (!!checkResult && titleIncludes) {
|
||||||
const titleArr = titleIncludes.split('/');
|
const titleArr = titleIncludes.split('/');
|
||||||
const keyword1 = dealInput(titleArr[0]);
|
const keyword1 = dealStringToArr(titleArr[0]);
|
||||||
const keyword2 = dealInput(titleArr[1]);
|
const keyword2 = dealStringToArr(titleArr[1]);
|
||||||
checkResult =
|
checkResult =
|
||||||
keyword2.length ?
|
keyword2.length ?
|
||||||
matchKeyword(issue.data.title, keyword1) && matchKeyword(issue.data.title, keyword2) :
|
matchKeyword(issue.data.title, keyword1) && matchKeyword(issue.data.title, keyword2) :
|
||||||
@@ -106,8 +106,8 @@ async function doCheckIssue (owner, repo, issueNumber) {
|
|||||||
|
|
||||||
if (!!checkResult && bodyIncludes) {
|
if (!!checkResult && bodyIncludes) {
|
||||||
const bodyArr = bodyIncludes.split('/');
|
const bodyArr = bodyIncludes.split('/');
|
||||||
const keyword1 = dealInput(bodyArr[0]);
|
const keyword1 = dealStringToArr(bodyArr[0]);
|
||||||
const keyword2 = dealInput(bodyArr[1]);
|
const keyword2 = dealStringToArr(bodyArr[1]);
|
||||||
checkResult =
|
checkResult =
|
||||||
keyword2.length ?
|
keyword2.length ?
|
||||||
matchKeyword(issue.data.body, keyword1) && matchKeyword(issue.data.body, keyword2) :
|
matchKeyword(issue.data.body, keyword1) && matchKeyword(issue.data.body, keyword2) :
|
||||||
|
36
src/base.js
36
src/base.js
@@ -20,7 +20,8 @@ const {
|
|||||||
} = require('./public.js');
|
} = require('./public.js');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
dealInput,
|
dealStringToArr,
|
||||||
|
dealRandomAssignees,
|
||||||
testDuplicate,
|
testDuplicate,
|
||||||
} = require('./util.js');
|
} = require('./util.js');
|
||||||
|
|
||||||
@@ -31,15 +32,18 @@ const context = github.context;
|
|||||||
|
|
||||||
const contents = core.getInput("contents");
|
const contents = core.getInput("contents");
|
||||||
|
|
||||||
|
const randomTo = core.getInput("random-to");
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
async function doAddAssignees (owner, repo, issueNumber, assignees) {
|
async function doAddAssignees (owner, repo, issueNumber, assignees) {
|
||||||
|
const arr = dealRandomAssignees(assignees, randomTo);
|
||||||
await octokit.issues.addAssignees({
|
await octokit.issues.addAssignees({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
assignees: dealInput(assignees)
|
assignees: arr
|
||||||
});
|
});
|
||||||
core.info(`Actions: [add-assignees][${assignees}] success!`);
|
core.info(`Actions: [add-assignees][${arr}] success!`);
|
||||||
};
|
};
|
||||||
|
|
||||||
async function doAddLabels (owner, repo, issueNumber, labels) {
|
async function doAddLabels (owner, repo, issueNumber, labels) {
|
||||||
@@ -47,7 +51,7 @@ async function doAddLabels (owner, repo, issueNumber, labels) {
|
|||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
labels: dealInput(labels)
|
labels: dealStringToArr(labels)
|
||||||
});
|
});
|
||||||
core.info(`Actions: [add-labels][${labels}] success!`);
|
core.info(`Actions: [add-labels][${labels}] success!`);
|
||||||
};
|
};
|
||||||
@@ -73,7 +77,7 @@ async function doCreateComment (owner, repo, issueNumber, body) {
|
|||||||
core.setOutput("comment-id", data.id);
|
core.setOutput("comment-id", data.id);
|
||||||
|
|
||||||
if (contents) {
|
if (contents) {
|
||||||
await doCreateCommentContent(owner, repo, data.id, dealInput(contents));
|
await doCreateCommentContent(owner, repo, data.id, dealStringToArr(contents));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -99,8 +103,8 @@ async function doCreateIssue (owner, repo, title, body, labels, assignees) {
|
|||||||
repo,
|
repo,
|
||||||
title,
|
title,
|
||||||
body,
|
body,
|
||||||
labels: dealInput(labels),
|
labels: dealStringToArr(labels),
|
||||||
assignees: dealInput(assignees),
|
assignees: dealRandomAssignees(assignees, randomTo),
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data } = await octokit.issues.create(params);
|
const { data } = await octokit.issues.create(params);
|
||||||
@@ -108,7 +112,7 @@ async function doCreateIssue (owner, repo, title, body, labels, assignees) {
|
|||||||
core.setOutput("issue-number", data.number);
|
core.setOutput("issue-number", data.number);
|
||||||
|
|
||||||
if (contents) {
|
if (contents) {
|
||||||
await doCreateIssueContent(owner, repo, data.number, dealInput(contents));
|
await doCreateIssueContent(owner, repo, data.number, dealStringToArr(contents));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,7 +176,7 @@ async function doMarkDuplicate (owner, repo, labels) {
|
|||||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
||||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
||||||
} else if (contents) {
|
} else if (contents) {
|
||||||
await doCreateCommentContent(owner, repo, commentId, dealInput(contents));
|
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
||||||
}
|
}
|
||||||
if (duplicateLabels) {
|
if (duplicateLabels) {
|
||||||
await doAddLabels(owner, repo, issueNumber, duplicateLabels);
|
await doAddLabels(owner, repo, issueNumber, duplicateLabels);
|
||||||
@@ -206,7 +210,7 @@ async function doRemoveAssignees (owner, repo, issueNumber, assignees) {
|
|||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
assignees: dealInput(assignees),
|
assignees: dealStringToArr(assignees)
|
||||||
});
|
});
|
||||||
core.info(`Actions: [remove-assignees][${assignees}] success!`);
|
core.info(`Actions: [remove-assignees][${assignees}] success!`);
|
||||||
};
|
};
|
||||||
@@ -217,7 +221,7 @@ async function doRemoveLabels (owner, repo, issueNumber, labels) {
|
|||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber
|
issue_number: issueNumber
|
||||||
});
|
});
|
||||||
const dealLabels = dealInput(labels);
|
const dealLabels = dealStringToArr(labels);
|
||||||
let addLables = [];
|
let addLables = [];
|
||||||
if (dealLabels.length) {
|
if (dealLabels.length) {
|
||||||
issue.data.labels.forEach(item => {
|
issue.data.labels.forEach(item => {
|
||||||
@@ -238,7 +242,7 @@ async function doSetLabels (owner, repo, issueNumber, labels) {
|
|||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
labels: dealInput(labels)
|
labels: dealStringToArr(labels)
|
||||||
});
|
});
|
||||||
core.info(`Actions: [set-labels][${labels}] success!`);
|
core.info(`Actions: [set-labels][${labels}] success!`);
|
||||||
};
|
};
|
||||||
@@ -285,7 +289,7 @@ async function doUpdateComment (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (contents) {
|
if (contents) {
|
||||||
await doCreateCommentContent(owner, repo, commentId, dealInput(contents));
|
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -343,8 +347,8 @@ async function doUpdateIssue (
|
|||||||
}
|
}
|
||||||
params.body = next_body;
|
params.body = next_body;
|
||||||
|
|
||||||
params.labels = labels ? dealInput(labels) : issue_labels;
|
params.labels = labels ? dealStringToArr(labels) : issue_labels;
|
||||||
params.assignees = assignees ? dealInput(assignees) : issue_assignees;
|
params.assignees = assignees ? dealStringToArr(assignees) : issue_assignees;
|
||||||
|
|
||||||
await octokit.issues.update(params);
|
await octokit.issues.update(params);
|
||||||
core.info(`Actions: [update-issue][${issueNumber}] success!`);
|
core.info(`Actions: [update-issue][${issueNumber}] success!`);
|
||||||
@@ -381,7 +385,7 @@ async function doWelcome (owner, repo, assignees, labels, body) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (issueContents) {
|
if (issueContents) {
|
||||||
await doCreateIssueContent(owner, repo, issueNumber, dealInput(issueContents));
|
await doCreateIssueContent(owner, repo, issueNumber, dealStringToArr(issueContents));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
core.info(`Actions: [welcome][${auth}] is not first time!`);
|
core.info(`Actions: [welcome][${auth}] is not first time!`);
|
||||||
|
@@ -98,3 +98,9 @@
|
|||||||
height: 14px;
|
height: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.__dumi-default-menu + .__dumi-default-layout-content {
|
||||||
|
tbody tr:hover {
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
15
src/util.js
15
src/util.js
@@ -1,4 +1,6 @@
|
|||||||
function dealInput (para) {
|
const sampleSize = require('lodash/sampleSize');
|
||||||
|
|
||||||
|
function dealStringToArr (para) {
|
||||||
/**
|
/**
|
||||||
* in 'x1,x2,x3'
|
* in 'x1,x2,x3'
|
||||||
* out ['x1','x2','x3']
|
* out ['x1','x2','x3']
|
||||||
@@ -15,6 +17,14 @@ function dealInput (para) {
|
|||||||
return arr;
|
return arr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function dealRandomAssignees (assignees, randomTo) {
|
||||||
|
let arr = dealStringToArr(assignees);
|
||||||
|
if (randomTo && Number(randomTo) > 0 && Number(randomTo) < arr.length) {
|
||||||
|
arr = sampleSize(arr, randomTo);
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
};
|
||||||
|
|
||||||
function matchKeyword (content, keywords) {
|
function matchKeyword (content, keywords) {
|
||||||
return keywords.find(item => content.toLowerCase().includes(item));
|
return keywords.find(item => content.toLowerCase().includes(item));
|
||||||
};
|
};
|
||||||
@@ -37,7 +47,8 @@ function getPreMonth (m) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
dealInput,
|
dealStringToArr,
|
||||||
|
dealRandomAssignees,
|
||||||
getPreMonth,
|
getPreMonth,
|
||||||
matchKeyword,
|
matchKeyword,
|
||||||
testDuplicate,
|
testDuplicate,
|
||||||
|
Reference in New Issue
Block a user