mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
feat: add toggle-labels
action (#132)
* feat: add `toggle-labels` action
* docs: update docs
* chore: npm run package
* Revert "docs: update docs"
This reverts commit b08e8f300e
.
* docs: update docs
* Update README.zh-CN.md
Co-authored-by: xrkffgg <xrkffgg@vip.qq.com>
* Update README.md
Co-authored-by: xrkffgg <xrkffgg@vip.qq.com>
* Update README.zh-CN.md
Co-authored-by: xrkffgg <xrkffgg@vip.qq.com>
* Update README.md
* move
* update
* lint code
* build
use npm run all
* update
* build
use npm run all
* chore: order
* update docs
* format code
use npm run format
* build
use npm run all
---------
Co-authored-by: xrkffgg <xrkffgg@vip.qq.com>
This commit is contained in:
34
README.md
34
README.md
@@ -256,6 +256,7 @@ When the following list does not have the features you want, you can submit it i
|
||||
- [`mark-assignees`](#mark-assignees)
|
||||
- [`mark-duplicate`](#mark-duplicate)
|
||||
- [`welcome`](#welcome)
|
||||
- [`toggle-labels`](#toggle-labels)
|
||||
|
||||
## 🚀 Usage
|
||||
|
||||
@@ -1150,6 +1151,39 @@ jobs:
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
|
||||
#### `toggle-labels`
|
||||
|
||||
When an issue is reopened, the set labels are removed if they already exist, otherwise they are added.
|
||||
|
||||
```yml
|
||||
name: Toggle Labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [reopened]
|
||||
|
||||
jobs:
|
||||
toggle-labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Toggle labels
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'toggle-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'unread,outdated'
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
| -- | -- | -- | -- |
|
||||
| actions | Action type | string | ✔ |
|
||||
| token | [Token explain](#token) | string | ✖ |
|
||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||
| labels | The toggle labels. Delete if the label already exists, add if it does not exist | string | ✖ |
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
|
||||
## 🎁 Reference
|
||||
|
||||
### token
|
||||
|
Reference in New Issue
Block a user