docs: up website & sh

This commit is contained in:
元凛
2022-02-09 17:24:35 +08:00
parent f6cad1ea63
commit 1a0a9f0bf6
41 changed files with 1340 additions and 2278 deletions

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -31,10 +31,10 @@ jobs:
random-to: 1
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
@@ -44,6 +44,7 @@ jobs:
- [Reference to on](/en-US/guide/ref#-github-docs)
- `${{ github.event.issue.number }}` is the current issue. [More references](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events)
- `assignees` support multiple and separated by comma
- You can assign up to 10 people to each issue
## `add-labels`
@@ -62,7 +63,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -70,10 +71,10 @@ jobs:
labels: 'bug' or 'xx1,xx2'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
@@ -85,17 +86,17 @@ Close the specified issue.
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
## `create-comment`
@@ -115,7 +116,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -124,22 +125,21 @@ jobs:
Hello @${{ github.event.issue.user.login }}. Add some comments.
你好 @${{ github.event.issue.user.login }}。巴拉巴拉。
contents: '+1' or '+1,heart'
emoji: '+1' or '+1,heart'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| body | Add comment content | string | ✖ |
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
- `body` default is `Currently at ${owner}/${repo}. And this is default comment.`
- Where `${owner}/${repo}` means the current repo
- No action when `body` is empty
- Return `comment-id`, which can be used for subsequent operations. [Usage reference](/en-US/guide/ref#-outputs-use)
- `${{ github.event.issue.user.login }}` indicates the creator of the issue
- `contents` support multiple and separated by comma
- `emoji` support multiple and separated by comma
## `create-issue`
@@ -157,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -165,19 +165,19 @@ jobs:
body: 'xxxx'
labels: 'xx'
assignees: 'xxx'
contents: '+1'
emoji: '+1'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| title | The title of the new issue | string | ✖ |
| body | The body of the new issue | string | ✖ |
| labels | The labels 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 | ✖ |
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
- `title` default is `Default Title`
- Return `issue-number`. [Usage reference](/en-US/guide/ref#-outputs-use)
@@ -188,7 +188,7 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
```yml
- name: Create label
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -197,10 +197,10 @@ Create label. If you want to maintain labels in batches, [see](https://github.co
label-desc: 'xx'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | 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 | ✖ |
@@ -214,21 +214,18 @@ According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified c
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: xxx
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| comment-id | The comment ID | number | ✔ |
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
- When `out-comments` is entered, `comment-id` does not work
## `lock-issue`
@@ -247,88 +244,39 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| lock-reason | Reason for locking issue | string | ✖ |
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
## `mark-duplicate`
Quickly mark duplicate questions, only for issue new comments or edit comments.
```yml
name: Issue Mark Duplicate
on:
issue_comment:
types: [created, edited]
jobs:
mark-duplicate:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
```
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| duplicate-command | Simple commands can be set, such as: `/d` | string | ✖ |
| duplicate-labels | Add additional labels to this issue | string | ✖ |
| remove-labels | Set removable labels | string | ✖ |
| labels | Replace the labels of the issue | string | ✖ |
| 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 | ✖ |
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
- `labels`: Highest priority
- `close-issue`: Both `true` or `'true'` can take effect
- `require-permission`: Optional values are `admin`, `write`, `read`, `none`
- If the team member sets the `read` permission, it is `read`
- If the external Collaborator is set to `read` permission, it is `read`
- Ordinary users have `read` permission
- When set `write`, `admin` and `write` meet the conditions
<Alert>
Note: Duplicate created with the concise command does not display the content of the red box in the figure below. But in fact this has no effect.
</Alert>
![](../public/duplicate.png)
## `open-issue`
Open the specified issue.
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
## `remove-assignees`
@@ -337,7 +285,7 @@ Remove the person designated by issue.
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -345,10 +293,10 @@ Remove the person designated by issue.
assignees: 'xx'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
@@ -358,7 +306,7 @@ Remove the specified labels.
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -366,10 +314,10 @@ Remove the specified labels.
labels: 'xx'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
@@ -381,7 +329,7 @@ Replace the labels of issue.
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -389,10 +337,10 @@ Replace the labels of issue.
labels: 'xx'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| labels | labels set. When empty characters, will remove all | string | ✔ |
@@ -402,17 +350,17 @@ Unlock the specified issue.
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
## `update-comment`
@@ -433,23 +381,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
contents: 'eyes'
emoji: 'eyes'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| comment-id | The comment ID | number | ✔ |
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
| body | Update the content of comment | string | ✖ |
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
- When `body` is not entered, it will remain as it is
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
@@ -461,7 +409,7 @@ Update the specified issue according to the `issue-number`.
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2
uses: actions-cool/issues-helper@v3
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -472,13 +420,13 @@ Update the specified issue according to the `issue-number`.
update-mode: 'replace'
labels: 'xx'
assignees: 'xxx'
contents: '+1'
emoji: '+1'
```
| Param | Desc | Type | Required |
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| token | [Token explain](/en-US/guide/ref#-token) | string | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
| title | Modify the title of the issue | string | ✖ |
@@ -486,46 +434,7 @@ Update the specified issue according to the `issue-number`.
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
| labels | Replace the labels of issue | string | ✖ |
| assignees | Replace the assignees of issue | string | ✖ |
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) | string | ✖ |
- `state` defaults to `open`
- When the option is not filled, it will keep the original
## `welcome`
When an issue is created, the user who created the issue for the first time is welcome.
If the user is not creating for the first time, there is no operation.
```yml
name: Issue Welcome
on:
issues:
types: [opened]
jobs:
issue-welcome:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
body: hi @${{ github.event.issue.user.login }}, welcome!
labels: 'welcome1, welcome2'
assignees: 'xx1'
issue-contents: '+1, -1, eyes'
```
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| body | Comment on the welcome content, no comment if you leave it blank | string | ✖ |
| labels | Add labels to this issue | string | ✖ |
| assignees | Add assignees to this issue | string | ✖ |
| issue-contents | Add [reaction](/en-US/guide/ref#-reactions-type) to this issue| string | ✖ |
- If these 4 options are not filled, no operation