mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d37ae0cdf9 | ||
![]() |
d3bb190d12 | ||
![]() |
09bb6e6e96 | ||
![]() |
1778fcd0b5 | ||
![]() |
fa8863340a |
17
.github/workflows/gh-pages.yml
vendored
17
.github/workflows/gh-pages.yml
vendored
@@ -1,17 +0,0 @@
|
||||
name: github pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: npm run docs:build
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./docs-dist
|
4
.github/workflows/surge-preview.yml
vendored
4
.github/workflows/surge-preview.yml
vendored
@@ -1,14 +1,12 @@
|
||||
name: 🔂 Surge PR Preview
|
||||
|
||||
on: pull_request_target
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
- uses: afc163/surge-preview@v1
|
||||
with:
|
||||
surge_token: ${{ secrets.SURGE_TOKEN }}
|
||||
|
@@ -2,4 +2,3 @@ dist/
|
||||
lib/
|
||||
docs-dist/
|
||||
node_modules/
|
||||
src/.umi/
|
||||
|
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,15 +1,3 @@
|
||||
## v2.1.0
|
||||
|
||||
`2021.02.02`
|
||||
|
||||
- feat: add create-label. [#54](https://github.com/actions-cool/issues-helper/pull/54)
|
||||
|
||||
## v2.0.0
|
||||
|
||||
`2021.01.26`
|
||||
|
||||
- refactor: add require-permission default. [#51](https://github.com/actions-cool/issues-helper/pull/51)
|
||||
|
||||
## v1.12
|
||||
|
||||
> It will be the last version of 1.x
|
||||
|
@@ -6,8 +6,8 @@
|
||||
[](https://github.com/marketplace/actions/issues-helper)
|
||||
[](https://github.com/umijs/dumi)
|
||||
[](https://github.com/prettier/prettier)
|
||||
|
||||
[](https://github.com/actions-cool/issues-helper/releases)
|
||||
|
||||
[](https://github.com/actions-cool/issues-helper/stargazers)
|
||||
[](https://github.com/actions-cool/issues-helper/discussions)
|
||||
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||
@@ -56,11 +56,6 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46" />
|
||||
<div>material-ui</div>
|
||||
</a></td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/prettier/prettier">
|
||||
<img src="https://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true" width="46" />
|
||||
<div>prettier</div>
|
||||
</a></td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/ant-design/pro-components">
|
||||
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
|
||||
@@ -71,12 +66,12 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46" />
|
||||
<div>react-component</div>
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/lijinke666/react-music-player">
|
||||
<img src="https://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true" width="46" />
|
||||
<div>react-music-player</div>
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/umijs/umi">
|
||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
|
||||
@@ -92,6 +87,7 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46" />
|
||||
<div>zoo</div>
|
||||
</a></td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -105,7 +101,6 @@ When the following list does not have the features you want, you can submit it i
|
||||
- [`close-issue`](#close-issue)
|
||||
- [`create-comment`](#create-comment)
|
||||
- [`create-issue`](#create-issue)
|
||||
- [`create-label`](#create-label)
|
||||
- [`delete-comment`](#delete-comment)
|
||||
- [`lock-issue`](#lock-issue)
|
||||
- [`mark-duplicate`](#mark-duplicate)
|
||||
@@ -149,7 +144,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -191,7 +186,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -216,7 +211,7 @@ Close the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -249,7 +244,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -293,7 +288,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -320,41 +315,13 @@ jobs:
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
|
||||
#### `create-label`
|
||||
|
||||
Create label。If you want to create multiple labels base on repository path. [See](https://github.com/actions-cool/create-labels).
|
||||
|
||||
```yml
|
||||
- name: Create label
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
with:
|
||||
actions: 'create-label'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label-name: 'xx'
|
||||
label-color: '0095b3'
|
||||
label-desc: 'xx'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](#token) | string | ✔ |
|
||||
| label-name | Label name, emoji support | string | ✔ |
|
||||
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||
| label-desc | Label description | string | ✖ |
|
||||
|
||||
- `label-name`: If it already exists, no operation
|
||||
- `label-color`: Default is `ededed`
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
|
||||
#### `delete-comment`
|
||||
|
||||
According to [`comment-id`](#comment-id) delete the specified comment.
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -386,7 +353,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -420,7 +387,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -436,12 +403,12 @@ jobs:
|
||||
| labels | Replace the labels of the issue | string | ✖ |
|
||||
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
|
||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||
| require-permission | Permission required | string | ✖ |
|
||||
|
||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||
- `labels`: Highest priority
|
||||
- `close-issue`: Both `true` or `'true'` can take effect
|
||||
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
||||
- `require-permission`: When you do not input, there is no limit. Anyone comment will trigger. 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
|
||||
@@ -455,7 +422,7 @@ Open the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -476,7 +443,7 @@ Remove the person designated by issue.
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -499,7 +466,7 @@ Remove the specified labels.
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -524,7 +491,7 @@ Replace the labels of issue.
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -547,7 +514,7 @@ Unlock the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -580,7 +547,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -608,7 +575,7 @@ Update the specified issue according to the `issue-number`.
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -658,7 +625,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -701,7 +668,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -754,7 +721,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -793,7 +760,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -827,7 +794,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -875,7 +842,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -922,7 +889,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -965,7 +932,7 @@ jobs:
|
||||
if: github.event.label.name == 'watch'
|
||||
steps:
|
||||
- name: find comments
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: fcid
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
@@ -976,7 +943,7 @@ jobs:
|
||||
|
||||
- name: create comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -985,7 +952,7 @@ jobs:
|
||||
|
||||
- name: update comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1017,7 +984,7 @@ When the token is not filled in actions or the corresponding secrets are not add
|
||||
|
||||
```yml
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: createissue
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
@@ -1092,7 +1059,6 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
|
||||
- v1 represents the initial version
|
||||
- The fixes and additions to the v1 version will be released to the v1.1 version
|
||||
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2 version
|
||||
- After the v2 version, the version will be released strictly according to the three-level semantics, such as v2.0.0, v2.1.0
|
||||
|
||||
- Version selection
|
||||
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
|
||||
|
96
README.md
96
README.md
@@ -6,8 +6,8 @@
|
||||
[](https://github.com/marketplace/actions/issues-helper)
|
||||
[](https://github.com/umijs/dumi)
|
||||
[](https://github.com/prettier/prettier)
|
||||
|
||||
[](https://github.com/actions-cool/issues-helper/releases)
|
||||
|
||||
[](https://github.com/actions-cool/issues-helper/stargazers)
|
||||
[](https://github.com/actions-cool/issues-helper/discussions)
|
||||
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||
@@ -56,11 +56,6 @@
|
||||
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46" />
|
||||
<div>material-ui</div>
|
||||
</a></td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/prettier/prettier">
|
||||
<img src="https://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true" width="46" />
|
||||
<div>prettier</div>
|
||||
</a></td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/ant-design/pro-components">
|
||||
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
|
||||
@@ -71,12 +66,12 @@
|
||||
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46" />
|
||||
<div>react-component</div>
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/lijinke666/react-music-player">
|
||||
<img src="https://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true" width="46" />
|
||||
<div>react-music-player</div>
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/umijs/umi">
|
||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
|
||||
@@ -92,6 +87,7 @@
|
||||
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46" />
|
||||
<div>zoo</div>
|
||||
</a></td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -105,7 +101,6 @@
|
||||
- [`close-issue`](#close-issue)
|
||||
- [`create-comment`](#create-comment)
|
||||
- [`create-issue`](#create-issue)
|
||||
- [`create-label`](#create-label)
|
||||
- [`delete-comment`](#delete-comment)
|
||||
- [`lock-issue`](#lock-issue)
|
||||
- [`mark-duplicate`](#mark-duplicate)
|
||||
@@ -149,7 +144,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -191,7 +186,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -216,7 +211,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -249,7 +244,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -293,7 +288,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -320,41 +315,13 @@ jobs:
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
|
||||
#### `create-label`
|
||||
|
||||
新增 label。若想根据目录生成多个 labels,[可查看](https://github.com/actions-cool/create-labels)。
|
||||
|
||||
```yml
|
||||
- name: Create label
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
with:
|
||||
actions: 'create-label'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label-name: 'xx'
|
||||
label-color: '0095b3'
|
||||
label-desc: 'xx'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](#token) | string | ✔ |
|
||||
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||
| label-desc | 标签描述 | string | ✖ |
|
||||
|
||||
- `label-name`:若已存在,则无操作
|
||||
- `label-color`:默认为 `ededed`
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
|
||||
#### `delete-comment`
|
||||
|
||||
根据 [`comment-id`](#comment-id) 删除指定评论。
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -386,7 +353,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -420,7 +387,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -436,12 +403,12 @@ jobs:
|
||||
| labels | 替换该 issue 的 labels | string | ✖ |
|
||||
| contents | 为该评论的增加 [reaction](#reactions-types) | string | ✖ |
|
||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||
| require-permission | 要求权限 | string | ✖ |
|
||||
|
||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||
- `labels`:优先级最高
|
||||
- `close-issue`:`true` 或 `'true'` 均可生效
|
||||
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||
- `require-permission`:当不输时,即无限制,任何人评论都会触发。可选值有 `admin`,`write`,`read`,`none`
|
||||
- 团队成员若设置 `read` 权限,则为 `read`
|
||||
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
||||
- 普通用户为 `read` 权限
|
||||
@@ -455,7 +422,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -476,7 +443,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -499,7 +466,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -524,7 +491,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -547,7 +514,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -580,7 +547,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -608,7 +575,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -656,7 +623,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -699,7 +666,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -748,7 +715,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -787,7 +754,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -821,7 +788,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -869,7 +836,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -916,7 +883,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -959,7 +926,7 @@ jobs:
|
||||
if: github.event.label.name == 'watch'
|
||||
steps:
|
||||
- name: find comments
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: fcid
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
@@ -970,7 +937,7 @@ jobs:
|
||||
|
||||
- name: create comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -979,7 +946,7 @@ jobs:
|
||||
|
||||
- name: update comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1011,7 +978,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: createissue
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
@@ -1087,7 +1054,6 @@ x2 + y2
|
||||
- v1 表示初始版本
|
||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
||||
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
|
||||
|
||||
- 版本选择
|
||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
||||
|
4
USERS.js
4
USERS.js
@@ -45,10 +45,6 @@ const users = [
|
||||
url: 'https://github.com/ant-design/pro-components',
|
||||
logo: 'https://avatars1.githubusercontent.com/u/12101536?s=200&v=4'
|
||||
},
|
||||
{
|
||||
url: 'https://github.com/prettier/prettier',
|
||||
logo: 'https://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true'
|
||||
},
|
||||
];
|
||||
|
||||
// **************************************************************************
|
||||
|
@@ -22,16 +22,8 @@ inputs:
|
||||
description: 'Issue assignees'
|
||||
random-to:
|
||||
description: 'Issue assignees random to'
|
||||
# label
|
||||
labels:
|
||||
description: 'Issue labels'
|
||||
label-name:
|
||||
description: 'Create label name'
|
||||
label-color:
|
||||
description: 'Create label color, default #ededed'
|
||||
label-desc:
|
||||
description: 'Create label description'
|
||||
|
||||
state:
|
||||
description: 'Issue state'
|
||||
update-mode:
|
||||
|
52
dist/index.js
vendored
52
dist/index.js
vendored
@@ -7985,30 +7985,6 @@ async function doCreateIssueContent(owner, repo, issueNumber, contents) {
|
||||
}
|
||||
}
|
||||
|
||||
async function doCreateLabel(owner, repo) {
|
||||
const name = core.getInput('label-name');
|
||||
const color = core.getInput('label-color') || 'ededed';
|
||||
const description = core.getInput('label-desc') || '';
|
||||
|
||||
if (!name) {
|
||||
core.setFailed(`This actions should input 'label-name'!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
await octokit.issues.createLabel({
|
||||
owner,
|
||||
repo,
|
||||
name,
|
||||
color,
|
||||
description,
|
||||
});
|
||||
core.info(`Actions: [create-label][${name}] success!`);
|
||||
} catch (err) {
|
||||
console.log(err.message)
|
||||
}
|
||||
}
|
||||
|
||||
async function doDeleteComment(owner, repo, commentId) {
|
||||
await octokit.issues.deleteComment({
|
||||
owner,
|
||||
@@ -8044,7 +8020,7 @@ async function doMarkDuplicate(owner, repo, labels) {
|
||||
const duplicateLabels = core.getInput('duplicate-labels');
|
||||
const removeLables = core.getInput('remove-labels');
|
||||
const closeIssue = core.getInput('close-issue');
|
||||
const requirePermission = core.getInput('require-permission') || 'write';
|
||||
const requirePermission = core.getInput('require-permission');
|
||||
|
||||
const commentId = context.payload.comment.id;
|
||||
const commentBody = context.payload.comment.body;
|
||||
@@ -8053,15 +8029,17 @@ async function doMarkDuplicate(owner, repo, labels) {
|
||||
|
||||
const ifCommandInput = !!duplicateCommand;
|
||||
|
||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||
owner,
|
||||
repo,
|
||||
username: commentUser,
|
||||
});
|
||||
const { permission } = res.data;
|
||||
if (!checkPermission(requirePermission, permission)) {
|
||||
core.info(`The user ${commentUser} is not allow!`);
|
||||
return false;
|
||||
if (requirePermission) {
|
||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||
owner,
|
||||
repo,
|
||||
username: commentUser,
|
||||
});
|
||||
const { permission } = res.data;
|
||||
if (!checkPermission(requirePermission, permission)) {
|
||||
core.info(`The user ${commentUser} is not allow!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -8337,7 +8315,6 @@ module.exports = {
|
||||
doCreateCommentContent,
|
||||
doCreateIssue,
|
||||
doCreateIssueContent,
|
||||
doCreateLabel,
|
||||
doDeleteComment,
|
||||
doMarkDuplicate,
|
||||
doLockIssue,
|
||||
@@ -8367,7 +8344,6 @@ const {
|
||||
doCloseIssue,
|
||||
doCreateComment,
|
||||
doCreateIssue,
|
||||
doCreateLabel,
|
||||
doDeleteComment,
|
||||
doMarkDuplicate,
|
||||
doLockIssue,
|
||||
@@ -8398,7 +8374,6 @@ const ALLACTIONS = [
|
||||
'close-issue',
|
||||
'create-comment',
|
||||
'create-issue',
|
||||
'create-label',
|
||||
'delete-comment',
|
||||
'lock-issue',
|
||||
'mark-duplicate',
|
||||
@@ -8479,9 +8454,6 @@ async function main() {
|
||||
case 'create-issue':
|
||||
await doCreateIssue(owner, repo, title, body, labels, assignees);
|
||||
break;
|
||||
case 'create-label':
|
||||
await doCreateLabel(owner, repo);
|
||||
break;
|
||||
case 'delete-comment':
|
||||
await doDeleteComment(owner, repo, commentId);
|
||||
break;
|
||||
|
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -142,7 +142,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -233,7 +233,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -138,7 +138,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -229,7 +229,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -85,7 +85,7 @@ Close the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -183,39 +183,13 @@ jobs:
|
||||
- `title` default is `Default Title`
|
||||
- Return `issue-number`. [Usage reference](/en-US/guide/ref#-outputs-use)
|
||||
|
||||
## `create-label`
|
||||
|
||||
Create label。If you want to create multiple labels base on repository path. [See](https://github.com/actions-cool/create-labels).
|
||||
|
||||
```yml
|
||||
- name: Create label
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
with:
|
||||
actions: 'create-label'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label-name: 'xx'
|
||||
label-color: '0095b3'
|
||||
label-desc: 'xx'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||
| label-name | Label name, emoji support | string | ✔ |
|
||||
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||
| label-desc | Label description | string | ✖ |
|
||||
|
||||
- `label-name`: If it already exists, no operation
|
||||
- `label-color`: Default is `ededed`
|
||||
|
||||
## `delete-comment`
|
||||
|
||||
According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified comment.
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -245,7 +219,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -277,7 +251,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -293,12 +267,12 @@ jobs:
|
||||
| labels | Replace the labels of the issue | string | ✖ |
|
||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||
| require-permission | Permission required | string | ✖ |
|
||||
|
||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||
- `labels`: Highest priority
|
||||
- `close-issue`: Both `true` or `'true'` can take effect
|
||||
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
|
||||
- `require-permission`: When you do not input, there is no limit. Anyone comment will trigger. 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
|
||||
@@ -316,7 +290,7 @@ Open the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -335,7 +309,7 @@ Remove the person designated by issue.
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -356,7 +330,7 @@ Remove the specified labels.
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -379,7 +353,7 @@ Replace the labels of issue.
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -400,7 +374,7 @@ Unlock the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -431,7 +405,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -457,7 +431,7 @@ Update the specified issue according to the `issue-number`.
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -505,7 +479,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
62
docs/base.md
62
docs/base.md
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -183,39 +183,13 @@ jobs:
|
||||
- `title` 默认为:`Default Title`
|
||||
- 返回 `issue-number`,[用法参考](/guide/ref#-outputs-使用)
|
||||
|
||||
## `create-label`
|
||||
|
||||
新增 label。若想根据目录生成多个 labels,[可查看](https://github.com/actions-cool/create-labels)。
|
||||
|
||||
```yml
|
||||
- name: Create label
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
with:
|
||||
actions: 'create-label'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label-name: 'xx'
|
||||
label-color: '0095b3'
|
||||
label-desc: 'xx'
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | 操作类型 | string | ✔ |
|
||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||
| label-desc | 标签描述 | string | ✖ |
|
||||
|
||||
- `label-name`:若已存在,则无操作
|
||||
- `label-color`:默认为 `ededed`
|
||||
|
||||
## `delete-comment`
|
||||
|
||||
根据 [`comment-id`](/guide/ref#-comment-id) 删除指定评论。
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -245,7 +219,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -277,7 +251,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -293,12 +267,12 @@ jobs:
|
||||
| labels | 替换该 issue 的 labels | string | ✖ |
|
||||
| contents | 为该评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||
| require-permission | 要求权限 | string | ✖ |
|
||||
|
||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||
- `labels`:优先级最高
|
||||
- `close-issue`:`true` 或 `'true'` 均可生效
|
||||
- `require-permission`:可选值有 `admin`,`write`,`read`,`none`
|
||||
- `require-permission`:当不输时,即无限制,任何人评论都会触发。可选值有 `admin`,`write`,`read`,`none`
|
||||
- 团队成员若设置 `read` 权限,则为 `read`
|
||||
- 外部 Collaborator 若设置 `read` 权限,则为 `read`
|
||||
- 普通用户为 `read` 权限
|
||||
@@ -316,7 +290,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -335,7 +309,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -356,7 +330,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -379,7 +353,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -400,7 +374,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -431,7 +405,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -457,7 +431,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -504,7 +478,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -9,7 +9,6 @@ toc: menu
|
||||
- v1 represents the initial version
|
||||
- The fixes and additions to the v1 version will be released to the v1.1 version
|
||||
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2 version
|
||||
- After the v2 version, the version will be released strictly according to the three-level semantics, such as v2.0.0, v2.1.0
|
||||
|
||||
- Version selection
|
||||
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
|
||||
|
@@ -9,7 +9,6 @@ toc: menu
|
||||
- v1 表示初始版本
|
||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
||||
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
|
||||
|
||||
- 版本选择
|
||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
||||
|
@@ -22,10 +22,6 @@ Yes, you can directly modify `actions`. For example: `actions:'create-comment'`
|
||||
|
||||
You can view the detailed [changelog](/en-US/changelog). The latest releases version is recommended.
|
||||
|
||||
## What should I pay attention to when upgrading from v1.x to v2?
|
||||
|
||||
There is only one difference between v1.12 and v2.0.0. That is, `require-permission` in `mark-duplicate` has added the default value `write`.
|
||||
|
||||
## What should I do if there is no function I want here?
|
||||
|
||||
You can submit it in [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18).
|
||||
|
@@ -22,10 +22,6 @@ GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有
|
||||
|
||||
你可以查看详细的 [更新日志](/changelog)。推荐采用最新 releases 版本。
|
||||
|
||||
## 从 v1.x 升级到 v2,有什么注意的地方吗?
|
||||
|
||||
v1.12 和 v2.0.0 版本的差别只有一处。即 `mark-duplicate` 中的 `require-permission` 增加了默认值 `write`。
|
||||
|
||||
## 如果这里没有我想要的功能,该怎么办?
|
||||
|
||||
你可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
|
||||
|
@@ -38,8 +38,6 @@ When an action is set, such as adding a label `x1` to an issue, Actions will aut
|
||||
|
||||
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.
|
||||
|
||||
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
|
||||
|
||||
## `assignees` scope
|
||||
|
||||
- The owner or collaborator of the warehouse, if there is an organization, including members
|
||||
|
@@ -39,8 +39,6 @@ with:
|
||||
|
||||
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
|
||||
|
||||
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
|
||||
|
||||
## `assignees` 范围
|
||||
|
||||
- 仓库的所有者或协作者,若有组织,包括成员
|
||||
|
@@ -33,7 +33,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v2.0.0
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
- `on`: The action trigger condition
|
||||
- Reference [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||
- `uses`: Use actions name
|
||||
- `uses: actions-cool/issues-helper@v2.0.0`。Please [refer](/en-US/changelog) to version selection
|
||||
- `uses: actions-cool/issues-helper@1.x`。Please [refer](/en-US/changelog) to version selection
|
||||
- `issues-hepler` parameter
|
||||
- `actions`: The name of the function used, **required**. Support multiple, separated by commas, such as `create-comment,close-issue` means comment and close issue
|
||||
- `token`: A person who needs to have push permission token
|
||||
|
@@ -33,7 +33,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v2.0.0
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
- `on`:action 触发条件
|
||||
- 参考 [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||
- `uses`:使用 actions 名称
|
||||
- `uses: actions-cool/issues-helper@v2.0.0`。版本选择请 [参考](/changelog)
|
||||
- `uses: actions-cool/issues-helper@1.x`。版本选择请 [参考](/changelog)
|
||||
- `issues-hepler` 参数
|
||||
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
|
||||
- `token`:需拥有 push 权限的人员 token
|
||||
|
@@ -38,7 +38,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -38,7 +38,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v2.1.0
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "issues-helper",
|
||||
"version": "2.0.0",
|
||||
"version": "1.12.0",
|
||||
"private": true,
|
||||
"description": "Some operations on issue.",
|
||||
"main": "src/main.js",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { readFileSync, writeFileSync } = require('fs');
|
||||
|
||||
const last = /v2\.0\.0/g;
|
||||
const now = 'v2.1.0';
|
||||
const last = /v1\.10/g;
|
||||
const now = 'v1.11';
|
||||
|
||||
let readme = readFileSync('./README.md', 'utf-8');
|
||||
readme = readme.replace(last, now);
|
||||
|
47
src/base.js
47
src/base.js
@@ -122,30 +122,6 @@ async function doCreateIssueContent(owner, repo, issueNumber, contents) {
|
||||
}
|
||||
}
|
||||
|
||||
async function doCreateLabel(owner, repo) {
|
||||
const name = core.getInput('label-name');
|
||||
const color = core.getInput('label-color') || 'ededed';
|
||||
const description = core.getInput('label-desc') || '';
|
||||
|
||||
if (!name) {
|
||||
core.setFailed(`This actions should input 'label-name'!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
await octokit.issues.createLabel({
|
||||
owner,
|
||||
repo,
|
||||
name,
|
||||
color,
|
||||
description,
|
||||
});
|
||||
core.info(`Actions: [create-label][${name}] success!`);
|
||||
} catch (err) {
|
||||
console.log(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
async function doDeleteComment(owner, repo, commentId) {
|
||||
await octokit.issues.deleteComment({
|
||||
owner,
|
||||
@@ -181,7 +157,7 @@ async function doMarkDuplicate(owner, repo, labels) {
|
||||
const duplicateLabels = core.getInput('duplicate-labels');
|
||||
const removeLables = core.getInput('remove-labels');
|
||||
const closeIssue = core.getInput('close-issue');
|
||||
const requirePermission = core.getInput('require-permission') || 'write';
|
||||
const requirePermission = core.getInput('require-permission');
|
||||
|
||||
const commentId = context.payload.comment.id;
|
||||
const commentBody = context.payload.comment.body;
|
||||
@@ -190,15 +166,17 @@ async function doMarkDuplicate(owner, repo, labels) {
|
||||
|
||||
const ifCommandInput = !!duplicateCommand;
|
||||
|
||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||
owner,
|
||||
repo,
|
||||
username: commentUser,
|
||||
});
|
||||
const { permission } = res.data;
|
||||
if (!checkPermission(requirePermission, permission)) {
|
||||
core.info(`The user ${commentUser} is not allow!`);
|
||||
return false;
|
||||
if (requirePermission) {
|
||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||
owner,
|
||||
repo,
|
||||
username: commentUser,
|
||||
});
|
||||
const { permission } = res.data;
|
||||
if (!checkPermission(requirePermission, permission)) {
|
||||
core.info(`The user ${commentUser} is not allow!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -474,7 +452,6 @@ module.exports = {
|
||||
doCreateCommentContent,
|
||||
doCreateIssue,
|
||||
doCreateIssueContent,
|
||||
doCreateLabel,
|
||||
doDeleteComment,
|
||||
doMarkDuplicate,
|
||||
doLockIssue,
|
||||
|
@@ -8,7 +8,6 @@ const {
|
||||
doCloseIssue,
|
||||
doCreateComment,
|
||||
doCreateIssue,
|
||||
doCreateLabel,
|
||||
doDeleteComment,
|
||||
doMarkDuplicate,
|
||||
doLockIssue,
|
||||
@@ -39,7 +38,6 @@ const ALLACTIONS = [
|
||||
'close-issue',
|
||||
'create-comment',
|
||||
'create-issue',
|
||||
'create-label',
|
||||
'delete-comment',
|
||||
'lock-issue',
|
||||
'mark-duplicate',
|
||||
@@ -120,9 +118,6 @@ async function main() {
|
||||
case 'create-issue':
|
||||
await doCreateIssue(owner, repo, title, body, labels, assignees);
|
||||
break;
|
||||
case 'create-label':
|
||||
await doCreateLabel(owner, repo);
|
||||
break;
|
||||
case 'delete-comment':
|
||||
await doDeleteComment(owner, repo, commentId);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user