Compare commits

...

33 Commits

Author SHA1 Message Date
xrkffgg
5c1fab1ef7 feat: default number support issue-comment (#90)
* feat: default number support issue-comment

* add log
2021-09-13 17:11:13 +08:00
元凛
2751b8e755 chore: fix build warn
close https://github.com/actions-cool/issues-helper/issues/89
2021-09-07 09:24:57 +08:00
元凛
3b3e72d628 docs: unity version 2021-09-06 19:36:15 +08:00
xrkffgg
ec5a128e11 fix: RemoveLabels when has no label (#88)
* fix: RemoveLabels when has no label

* doc
2021-09-06 19:17:30 +08:00
xrkffgg
8482b73885 Create CONTRIBUTING.md 2021-09-06 13:37:01 +08:00
元凛
23e8a42c18 docs: add 2.4.1 changelog 2021-09-05 19:41:57 +08:00
xrkffgg
f83978e0ed fix: remove labels define error (#86)
* fix: remove labels define error

* chore: up dumi version

* chore: adjust app
2021-09-05 19:39:49 +08:00
xrkffgg
207593c17b docs: up issue temp 2021-08-27 10:06:39 +08:00
元凛
47079090b4 docs: update logo url 2021-08-16 11:19:04 +08:00
元凛
33f5c9a41b docs: add user naive-ui 2021-08-16 10:32:57 +08:00
xrkffgg
3f73e5f3b7 chore: up 2.4.0 (#84)
* chore: up 2.4.0

* fix: add miss
2021-08-15 20:24:47 +08:00
xrkffgg
dc4a7a3ca8 feat: support custom repo (#83) 2021-08-15 19:55:45 +08:00
xrkffgg
f76bae5b37 feat: support default issueNumber get from context (#81) 2021-08-13 14:46:48 +08:00
xrkffgg
b395ad434f fix: action run async (#79)
* fix: for await

* style: perf mess

Co-authored-by: meteorlxy <meteor.lxy@foxmail.com>
2021-08-13 12:58:11 +08:00
xrkffgg
b5d3740262 docs: remove error mess (#80) 2021-08-12 20:56:13 +08:00
元凛
c7e172c679 docs: up nutui logo 2021-08-10 20:18:38 +08:00
元凛
7198ab8542 docs: add user vuepress 2021-08-10 19:59:00 +08:00
元凛
eb91a70ccc docs: up 2.3.1 2021-08-09 23:48:37 +08:00
meteorlxy
db8ab69114 refactor: extract exclude-labels array to outer scope (#75) 2021-08-09 23:41:33 +08:00
元凛
86102bcaef docs: add changelog emoji 2021-08-09 19:35:19 +08:00
元凛
c585c79a2a docs: up v2.3.0 2021-08-09 19:26:36 +08:00
xrkffgg
b64d6e451f feat: add exclude-labels for query issues (#74)
* feat: add exclude-labels for query issues

* add formay

* Update ci.yml

* docs: add readme
2021-08-09 19:18:55 +08:00
xrkffgg
d443509c47 Create ci-notice.yml 2021-06-17 23:54:56 +08:00
元凛
4b5824425d style: perf show 2021-05-24 23:59:15 +08:00
ajuner
b483519646 docs: add user (#72)
* docs: add user

* fix(users): add params

* feat(users): add imgStyle

* Update README.md

* Update USERS.js

* Update README.md

* Update README.en-US.md

* Update update-users.js

Co-authored-by: xrkffgg <xrkffgg@gmail.com>
2021-05-24 23:46:01 +08:00
xrkffgg
4a12f7e54a ci: add auto gh pages 2021-05-08 20:06:39 +08:00
元凛
1b100be0d7 docs: add note 2021-05-08 20:04:39 +08:00
xrkffgg
afb2d0f2e5 chore: move less out src (#71)
* chore: move less out src

* remove
2021-04-12 15:14:13 +08:00
xrkffgg
86d9dd7f1a chore: update dumi version 2021-03-29 11:40:08 +08:00
xrkffgg
5891ef3922 ci: update preview (#69)
* Create preview-start.yml

* Create preview-build.yml

* Create preview-deploy.yml

* Delete surge-preview.yml
2021-03-29 11:30:05 +08:00
xrkffgg
7a119339df docs: simple pr temp 2021-03-29 11:06:49 +08:00
ajuner
958f1760a2 docs: add user (#68)
* docs: add user

* chore: code format

* fix: update users script
2021-03-29 11:05:52 +08:00
xrkffgg
d82909b31d fix: list comment page lost in [find-comments] (#66)
* fix: list comment page lost in [find-comments]

* add changelog
2021-03-21 20:32:11 +08:00
40 changed files with 20485 additions and 702 deletions

View File

@@ -8,8 +8,8 @@ assignees:
### 🐛 Bug 描述 Bug description
<!-- 请在上方详细地描述 bug让大家都能理解。 -->
<!-- Please describe the bug in detail above so that everyone can understand. -->
<!-- 请在上方详细地描述 bug让大家都能理解。建议附上使用代码。 -->
<!-- Please describe the bug in detail above so that everyone can understand. It is recommended to attach the use code. -->
### 🏞 期望结果 Desired result

View File

@@ -42,13 +42,4 @@ Describe changes from the user side, and list all potential break changes or oth
| 🇺🇸 English | |
| 🇨🇳 Chinese | |
### ☑️ 请求合并前的自查清单 / Self Check before Merge
⚠️ 请自检并全部**勾选全部选项**。/ Please check all items below before review. ⚠️
- [ ] 文档已补充或无须补充 / Doc is updated/provided or not needed
- [ ] 代码演示已提供或无须提供 / Demo is updated/provided or not needed
- [ ] TypeScript 定义已补充或无须补充 / TypeScript definition is updated/provided or not needed
- [ ] Changelog 已提供或无须提供 / Changelog is provided or not needed
<!-- From: https://github.com/one-template/pr-template -->

22
.github/workflows/ci-notice.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: CI Notice
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@main
- uses: actions-cool/ci-notice@main
with:
ci: |
yarn
yarn run package
yarn run docs:build
notice-types: 'issue'
issue-assignees: 'xrkffgg'

View File

@@ -15,5 +15,8 @@ jobs:
- name: format
run: yarn format-check
- name: test
run: yarn test
- name: package
run: yarn package

19
.github/workflows/gh-pages.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
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

40
.github/workflows/preview-build.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Preview Build
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: build
run: |
yarn
yarn docs-dev:build
- run: |
zip -r dist.zip docs-dist
- name: upload dist artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist.zip
retention-days: 5
- name: Save PR number
if: ${{ always() }}
run: echo ${{ github.event.number }} > ./pr-id.txt
- name: Upload PR number
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: pr
path: ./pr-id.txt

92
.github/workflows/preview-deploy.yml vendored Normal file
View File

@@ -0,0 +1,92 @@
name: Preview Deploy
on:
workflow_run:
workflows: ["Preview Build"]
types:
- completed
jobs:
success:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
steps:
- name: download pr artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: pr
- name: save PR id
id: pr
run: echo "::set-output name=id::$(<pr-id.txt)"
- name: download dist artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
name: dist
- run: |
unzip dist.zip
- name: upload surge service
id: deploy
run: |
export DEPLOY_DOMAIN=https://issues-helper-preview-pr-${{ steps.pr.outputs.id }}.surge.sh
npx surge --project ./docs-dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
- name: update status comment
uses: actions-cool/maintain-one-comment@v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
🎊 PR Preview has been successfully built and deployed to https://issues-helper-preview-pr-${{ steps.pr.outputs.id }}.surge.sh
<img width="300" src="https://user-images.githubusercontent.com/507615/90250366-88233900-de6e-11ea-95a5-84f0762ffd39.png">
<!-- Sticky Pull Request Comment -->
body-include: '<!-- Sticky Pull Request Comment -->'
number: ${{ steps.pr.outputs.id }}
- name: The job failed
if: ${{ failure() }}
uses: actions-cool/maintain-one-comment@v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
😭 Deploy PR Preview failed.
<img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
<!-- Sticky Pull Request Comment -->
body-include: '<!-- Sticky Pull Request Comment -->'
number: ${{ steps.pr.outputs.id }}
failed:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
steps:
- name: download pr artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: pr
- name: save PR id
id: pr
run: echo "::set-output name=id::$(<pr-id.txt)"
- name: The job failed
uses: actions-cool/maintain-one-comment@v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
😭 Deploy PR Preview failed.
<img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
<!-- Sticky Pull Request Comment -->
body-include: '<!-- Sticky Pull Request Comment -->'
number: ${{ steps.pr.outputs.id }}

19
.github/workflows/preview-start.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Preview Start
on: pull_request_target
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: create
uses: actions-cool/maintain-one-comment@v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
⚡️ Deploying PR Preview...
<img src="https://user-images.githubusercontent.com/507615/90240294-8d2abd00-de5b-11ea-8140-4840a0b2d571.gif" width="300" />
<!-- Sticky Pull Request Comment -->
body-include: '<!-- Sticky Pull Request Comment -->'

View File

@@ -1,18 +0,0 @@
name: 🔂 Surge PR Preview
on: pull_request
jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: afc163/surge-preview@v1
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
build: |
yarn
yarn docs-dev:build
dist: docs-dist
teardown: 'true'

View File

@@ -1,4 +1,54 @@
# Changelog
<!--
🐞 Bug fix
🚀 New feature
💄 Perf
📝 Docs
⚡️ Code style
-->
## v2.4.3
`2021.09.13`
- 🚀 feat: default number support `issue-comment`. [#90](https://github.com/actions-cool/issues-helper/pull/90)
## v2.4.2
`2021.09.06`
- 🐞 fix: `doRemoveLabels` when has no label. [#88](https://github.com/actions-cool/issues-helper/pull/88)
## v2.4.1
`2021.09.05`
- 🐞 fix: remove labels define error. [#86](https://github.com/actions-cool/issues-helper/pull/86)
## v2.4.0
`2021.08.15`
- 🚀 feat: support custom repo. [#83](https://github.com/actions-cool/issues-helper/pull/83)
- 🚀 feat: support default issueNumber get from context. [#81](https://github.com/actions-cool/issues-helper/pull/81)
- 🐞 fix: action run async. [#79](https://github.com/actions-cool/issues-helper/pull/79)
## v2.3.1
`2021.08.09`
- ⚡️ refactor: extract exclude-labels array to outer scope. [#75](https://github.com/actions-cool/issues-helper/pull/75) [@meteorlxy](https://github.com/meteorlxy)
## v2.3.0
`2021.08.09`
- 🚀 feat: add exclude-labels for `check-inactive` `close-issues` `lock-issues`. [#74](https://github.com/actions-cool/issues-helper/pull/74)
## v2.2.1
`2021.03.21`
- fix: list comment page lost in `find-comments`. [#66](https://github.com/actions-cool/issues-helper/pull/66)
## v2.2.0

9
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,9 @@
## release
完整版本在网页上进行
### 替换小版本
- 删除 v2 tag
- git push origin :refs/tags/v2
- 把最新的 v2.1.0 推送到 远端 v2 tag
- git push origin v2.1.0:v2

View File

@@ -32,77 +32,128 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
<tr>
<td align="center" width="180">
<a href="https://github.com/ant-design/ant-design">
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
<div>ant-design</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/ant-design-blazor/ant-design-blazor">
<img src="https://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg" width="46" />
<div>ant-design-blazor</div>
</a></td>
<img src="https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/vueComponent/ant-design-vue">
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46" />
<div>ant-design-vue</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/umijs/dumi">
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
<div>dumi</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/ant-design/ant-design">ant-design</a></td>
<td align="center" width="180"><a href="https://github.com/ant-design-blazor/ant-design-blazor">ant-design-blazor</a></td>
<td align="center" width="180"><a href="https://github.com/vueComponent/ant-design-vue">ant-design-vue</a></td>
<td align="center" width="180"><a href="https://github.com/umijs/dumi">dumi</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/alibaba/formily">
<img src="https://img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg" width=""/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/vuejs/jsx-next">
<img src="https://avatars.githubusercontent.com/u/6128107?s=200&v=4" width="46" />
<div>jsx-next</div>
</a></td>
<img src="https://avatars.githubusercontent.com/u/6128107?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/mui-org/material-ui">
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46" />
<div>material-ui</div>
</a></td>
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/TuSimple/naive-ui">
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
<td align="center" width="180"><a href="https://github.com/mui-org/material-ui">material-ui</a></td>
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/jdf2e/nutui">
<img src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" width="46"/>
</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>
<img src="https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png" width="46"/>
</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" />
<div>pro-components</div>
</a></td>
</tr><tr>
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/react-component">
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46" />
<div>react-component</div>
</a></td>
<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>
<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" />
<div>umi</div>
</a></td>
<td align="center" width="180">
<a href="https://github.com/vitejs/vite">
<img src="https://avatars.githubusercontent.com/u/65625612?s=200&v=4" width="46" />
<div>vite</div>
</a></td>
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
<td align="center" width="180"><a href="https://github.com/ant-design/pro-components">pro-components</a></td>
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/lijinke666/react-music-player">
<img src="https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png" width="46"/>
</a>
</td>
<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"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/vitejs/vite">
<img src="https://avatars.githubusercontent.com/u/65625612?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/AttoJS/vue-request">
<img src="https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png" width="46" />
<div>vue-request</div>
</a></td>
<img src="https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
<td align="center" width="180"><a href="https://github.com/AttoJS/vue-request">vue-request</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/vuepress/vuepress-next">
<img src="https://v2.vuepress.vuejs.org/images/hero.png" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/zoo-js/zoo">
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46" />
<div>zoo</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180"></td>
<td align="center" width="180"></td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/vuepress/vuepress-next">vuepress-next</a></td>
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
<td align="center" width="180"></td>
<td align="center" width="180"></td>
</tr>
@@ -170,7 +221,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -183,7 +234,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
@@ -212,7 +263,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -224,7 +275,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
- `labels` support multiple and separated by comma
@@ -237,19 +288,18 @@ Close the specified issue.
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
body: 'This is auto closed.'
```
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
⏫ [Back to list](#List)
@@ -270,7 +320,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -286,7 +336,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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](#reactions-types) | string | ✖ |
@@ -314,7 +364,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -347,7 +397,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.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -375,7 +425,7 @@ According to [`comment-id`](#comment-id) delete the specified comment.
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -410,7 +460,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -421,7 +471,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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`
@@ -444,7 +494,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -479,7 +529,7 @@ Open the specified issue.
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -490,7 +540,7 @@ Open the specified issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
⏫ [Back to list](#List)
@@ -500,7 +550,7 @@ Remove the person designated by issue.
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -512,7 +562,7 @@ Remove the person designated by issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✔ |
⏫ [Back to list](#List)
@@ -523,7 +573,7 @@ Remove the specified labels.
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -535,7 +585,7 @@ Remove the specified labels.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✔ |
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
@@ -548,7 +598,7 @@ Replace the labels of issue.
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -560,7 +610,7 @@ Replace the labels of issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✔ |
⏫ [Back to list](#List)
@@ -571,7 +621,7 @@ Unlock the specified issue.
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -582,7 +632,7 @@ Unlock the specified issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
⏫ [Back to list](#List)
@@ -604,7 +654,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -634,7 +684,7 @@ Update the specified issue according to the `issue-number`.
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -652,7 +702,7 @@ Update the specified issue according to the `issue-number`.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
| body | Modify the content of issue | string | ✖ |
@@ -684,7 +734,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -727,7 +777,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -749,6 +799,7 @@ jobs:
| title-includes | Title filtering | string | ✖ |
| inactive-day | Inactive days filtering | number | ✖ |
| inactive-label | The label name adding | string | ✖ |
| exclude-labels | Exclude labels filtering | string | ✖ |
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
@@ -780,7 +831,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -793,7 +844,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
| assignee-includes | Assignees contains check | string | ✖ |
| title-includes | Title contains check | string | ✖ |
| title-excludes | Check whether the title is empty after removing the default title | string | ✖ |
@@ -820,7 +871,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -841,6 +892,7 @@ jobs:
| body-includes | Body filtering | string | ✖ |
| title-includes | Title filtering | string | ✖ |
| inactive-day | Inactive days filtering | number | ✖ |
| exclude-labels | Exclude labels filtering | string | ✖ |
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
@@ -854,7 +906,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.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -867,7 +919,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
| direction | Return `comments` sort | string | ✖ |
@@ -902,7 +954,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -925,6 +977,7 @@ jobs:
| title-includes | Title filtering | string | ✖ |
| inactive-day | Inactive days filtering | number | ✖ |
| lock-reason | Reason for locking issue | string | ✖ |
| exclude-labels | Exclude labels filtering | string | ✖ |
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
@@ -949,7 +1002,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -994,7 +1047,7 @@ jobs:
if: github.event.label.name == 'watch'
steps:
- name: find comments
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
id: fcid
with:
actions: 'find-comments'
@@ -1009,7 +1062,7 @@ jobs:
- name: create comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1020,7 +1073,7 @@ jobs:
- name: update comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1061,7 +1114,7 @@ When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`,
```yml
- name: Create issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
id: createissue
with:
actions: 'create-issue'

233
README.md
View File

@@ -32,77 +32,128 @@
<tr>
<td align="center" width="180">
<a href="https://github.com/ant-design/ant-design">
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
<div>ant-design</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/ant-design-blazor/ant-design-blazor">
<img src="https://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg" width="46" />
<div>ant-design-blazor</div>
</a></td>
<img src="https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/vueComponent/ant-design-vue">
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46" />
<div>ant-design-vue</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/umijs/dumi">
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
<div>dumi</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/ant-design/ant-design">ant-design</a></td>
<td align="center" width="180"><a href="https://github.com/ant-design-blazor/ant-design-blazor">ant-design-blazor</a></td>
<td align="center" width="180"><a href="https://github.com/vueComponent/ant-design-vue">ant-design-vue</a></td>
<td align="center" width="180"><a href="https://github.com/umijs/dumi">dumi</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/alibaba/formily">
<img src="https://img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg" width=""/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/vuejs/jsx-next">
<img src="https://avatars.githubusercontent.com/u/6128107?s=200&v=4" width="46" />
<div>jsx-next</div>
</a></td>
<img src="https://avatars.githubusercontent.com/u/6128107?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/mui-org/material-ui">
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46" />
<div>material-ui</div>
</a></td>
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/TuSimple/naive-ui">
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
<td align="center" width="180"><a href="https://github.com/mui-org/material-ui">material-ui</a></td>
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/jdf2e/nutui">
<img src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" width="46"/>
</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>
<img src="https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png" width="46"/>
</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" />
<div>pro-components</div>
</a></td>
</tr><tr>
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/react-component">
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46" />
<div>react-component</div>
</a></td>
<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>
<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" />
<div>umi</div>
</a></td>
<td align="center" width="180">
<a href="https://github.com/vitejs/vite">
<img src="https://avatars.githubusercontent.com/u/65625612?s=200&v=4" width="46" />
<div>vite</div>
</a></td>
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
<td align="center" width="180"><a href="https://github.com/ant-design/pro-components">pro-components</a></td>
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/lijinke666/react-music-player">
<img src="https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png" width="46"/>
</a>
</td>
<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"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/vitejs/vite">
<img src="https://avatars.githubusercontent.com/u/65625612?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/AttoJS/vue-request">
<img src="https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png" width="46" />
<div>vue-request</div>
</a></td>
<img src="https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png" width="46"/>
</a>
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
<td align="center" width="180"><a href="https://github.com/AttoJS/vue-request">vue-request</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/vuepress/vuepress-next">
<img src="https://v2.vuepress.vuejs.org/images/hero.png" width="46"/>
</a>
</td>
<td align="center" width="180">
<a href="https://github.com/zoo-js/zoo">
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46" />
<div>zoo</div>
</a></td>
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180"></td>
<td align="center" width="180"></td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/vuepress/vuepress-next">vuepress-next</a></td>
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
<td align="center" width="180"></td>
<td align="center" width="180"></td>
</tr>
@@ -174,7 +225,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -187,7 +238,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
@@ -216,7 +267,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -228,7 +279,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| labels | 新增的 labels。当不填或者为空字符时不新增 | string | ✖ |
- `labels` 支持多个,需用逗号隔开
@@ -241,19 +292,18 @@ jobs:
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
body: 'This is auto closed.'
```
| 参数 | 描述 | 类型 | 必填 |
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
⏫ [返回列表](#列-表)
@@ -274,7 +324,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -290,7 +340,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| body | 新增评论的内容 | string | ✖ |
| contents | 为新增评论的增加 [reaction](#reactions-types) | string | ✖ |
@@ -318,7 +368,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -351,7 +401,7 @@ jobs:
```yml
- name: Create label
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -379,7 +429,7 @@ jobs:
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -414,7 +464,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -425,7 +475,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| lock-reason | 锁定 issue 的原因 | string | ✖ |
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
@@ -448,7 +498,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -483,7 +533,7 @@ jobs:
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -494,7 +544,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
⏫ [返回列表](#列-表)
@@ -504,7 +554,7 @@ jobs:
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -516,7 +566,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
⏫ [返回列表](#列-表)
@@ -527,7 +577,7 @@ jobs:
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -539,7 +589,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| labels | 移除的 labels。当为空字符时不进行移除 | string | ✔ |
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
@@ -552,7 +602,7 @@ jobs:
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -564,7 +614,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
⏫ [返回列表](#列-表)
@@ -575,7 +625,7 @@ jobs:
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -586,7 +636,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
⏫ [返回列表](#列-表)
@@ -608,7 +658,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -638,7 +688,7 @@ jobs:
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -656,7 +706,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
| title | 修改 issue 的标题 | string | ✖ |
| body | 修改 issue 的内容 | string | ✖ |
@@ -686,7 +736,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -729,7 +779,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -751,6 +801,7 @@ jobs:
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| inactive-label | 新增标签名称 | string | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
@@ -778,7 +829,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -791,7 +842,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| assignee-includes | 是否包含指定人 | string | ✖ |
| title-includes | 标题包含校验 | string | ✖ |
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
@@ -818,7 +869,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -839,6 +890,7 @@ jobs:
| body-includes | 包含内容筛选 | string | ✖ |
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
@@ -852,7 +904,7 @@ jobs:
```yml
- name: Find comments
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -865,7 +917,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](#token) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
| direction | 返回 `comments` 排序 | string | ✖ |
@@ -900,7 +952,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -923,6 +975,7 @@ jobs:
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| lock-reason | 锁定 issue 的原因 | string | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
@@ -947,7 +1000,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -992,7 +1045,7 @@ jobs:
if: github.event.label.name == 'watch'
steps:
- name: find comments
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
id: fcid
with:
actions: 'find-comments'
@@ -1007,7 +1060,7 @@ jobs:
- name: create comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1018,7 +1071,7 @@ jobs:
- name: update comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1059,7 +1112,7 @@ jobs:
```yml
- name: Create issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
id: createissue
with:
actions: 'create-issue'

View File

@@ -1,5 +1,12 @@
// **************************************************************************
// Add to end
/**
* @param {string} url github地址
* @param {string} logo logo地址
* @param {string} width 自定义宽度,设置 auto 用于长型 logo
*/
const users = [
{
url: 'https://github.com/ant-design/ant-design',
@@ -19,7 +26,7 @@ const users = [
},
{
url: 'https://github.com/AttoJS/vue-request',
logo: 'https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png'
logo: 'https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png'
},
{
url: 'https://github.com/mui-org/material-ui',
@@ -27,11 +34,11 @@ const users = [
},
{
url: 'https://github.com/lijinke666/react-music-player',
logo: 'https://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true'
logo: 'https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png'
},
{
url: 'https://github.com/ant-design-blazor/ant-design-blazor',
logo: 'https://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg'
logo: 'https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png'
},
{
url: 'https://github.com/zoo-js/zoo',
@@ -47,15 +54,32 @@ const users = [
},
{
url: 'https://github.com/prettier/prettier',
logo: 'https://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true'
logo: 'https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png',
},
{
url: 'https://github.com/vuejs/jsx-next',
logo: 'https://avatars.githubusercontent.com/u/6128107?s=200&v=4'
logo: 'https://avatars.githubusercontent.com/u/6128107?s=200&v=4',
},
{
url: 'https://github.com/vitejs/vite',
logo: 'https://avatars.githubusercontent.com/u/65625612?s=200&v=4'
logo: 'https://avatars.githubusercontent.com/u/65625612?s=200&v=4',
},
{
url: 'https://github.com/jdf2e/nutui',
logo: 'https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png',
},
{
width: 'auto',
url: 'https://github.com/alibaba/formily',
logo: 'https://img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
},
{
url: 'https://github.com/vuepress/vuepress-next',
logo: 'https://v2.vuepress.vuejs.org/images/hero.png',
},
{
url: 'https://github.com/TuSimple/naive-ui',
logo: 'https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667',
},
];

View File

@@ -13,6 +13,9 @@ inputs:
token:
description: 'Github_token'
default: ${{ github.token }}
repo:
description: 'The repositorie'
issue-number:
description: 'Issue-number'
comment-id:
@@ -74,6 +77,9 @@ inputs:
description: 'The reason lock issue'
inactive-label:
description: 'Issue label set use'
exclude-labels:
description: 'Query issues exclude labels'
duplicate-command:
description: 'For mark-duplicate'
duplicate-labels:

3370
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -44,6 +44,7 @@ jobs:
| title-includes | Title filtering | string | ✖ |
| inactive-day | Inactive days filtering | number | ✖ |
| inactive-label | The label name adding | string | ✖ |
| exclude-labels | Exclude labels filtering | string | ✖ |
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
@@ -73,7 +74,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -86,7 +87,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
| assignee-includes | Assignees contains check | string | ✖ |
| title-includes | Title contains check | string | ✖ |
| title-excludes | Check whether the title is empty after removing the default title | string | ✖ |
@@ -111,7 +112,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -132,6 +133,7 @@ jobs:
| body-includes | Body filtering | string | ✖ |
| title-includes | Title filtering | string | ✖ |
| inactive-day | Inactive days filtering | number | ✖ |
| exclude-labels | Exclude labels filtering | string | ✖ |
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
@@ -143,7 +145,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.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -156,7 +158,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
| direction | Return `comments` sort | string | ✖ |
@@ -189,7 +191,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -212,6 +214,7 @@ jobs:
| title-includes | Title filtering | string | ✖ |
| inactive-day | Inactive days filtering | number | ✖ |
| lock-reason | Reason for locking issue | string | ✖ |
| exclude-labels | Exclude labels filtering | string | ✖ |
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
@@ -234,7 +237,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -44,6 +44,7 @@ jobs:
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| inactive-label | 新增标签名称 | string | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
@@ -69,7 +70,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -82,7 +83,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| assignee-includes | 是否包含指定人 | string | ✖ |
| title-includes | 标题包含校验 | string | ✖ |
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
@@ -107,7 +108,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -128,6 +129,7 @@ jobs:
| body-includes | 包含内容筛选 | string | ✖ |
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
@@ -139,7 +141,7 @@ jobs:
```yml
- name: Find comments
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -152,7 +154,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
| direction | 返回 `comments` 排序 | string | ✖ |
@@ -185,7 +187,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -208,6 +210,7 @@ jobs:
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| lock-reason | 锁定 issue 的原因 | string | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
@@ -230,7 +233,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -35,7 +35,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
@@ -62,7 +62,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -74,7 +74,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
- `labels` support multiple and separated by comma
@@ -85,19 +85,18 @@ Close the specified issue.
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
body: 'This is auto closed.'
```
| Param | Desc | Type | Required |
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
## `create-comment`
@@ -116,7 +115,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -132,7 +131,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
@@ -158,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -189,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.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -215,7 +214,7 @@ According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified c
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -248,7 +247,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -259,7 +258,7 @@ jobs:
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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`
@@ -280,7 +279,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -319,7 +318,7 @@ Open the specified issue.
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -330,7 +329,7 @@ Open the specified issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
## `remove-assignees`
@@ -338,7 +337,7 @@ Remove the person designated by issue.
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -350,7 +349,7 @@ Remove the person designated by issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✔ |
## `remove-labels`
@@ -359,7 +358,7 @@ Remove the specified labels.
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -371,7 +370,7 @@ Remove the specified labels.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✔ |
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
@@ -382,7 +381,7 @@ Replace the labels of issue.
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -394,7 +393,7 @@ Replace the labels of issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✔ |
## `unlock-issue`
@@ -403,7 +402,7 @@ Unlock the specified issue.
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -414,7 +413,7 @@ Unlock the specified issue.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | |
## `update-comment`
@@ -434,7 +433,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -462,7 +461,7 @@ Update the specified issue according to the `issue-number`.
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -480,7 +479,7 @@ Update the specified issue according to the `issue-number`.
| -- | -- | -- | -- |
| actions | Action type | string | ✔ |
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
| issue-number | The number of issue | number | |
| 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 | ✖ |
| body | Modify the content of issue | string | ✖ |
@@ -510,7 +509,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -35,7 +35,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
@@ -62,7 +62,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -74,7 +74,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| labels | 新增的 labels。当不填或者为空字符时不新增 | string | ✖ |
- `labels` 支持多个,需用逗号隔开
@@ -85,19 +85,18 @@ jobs:
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: xxx
body: 'This is auto closed.'
```
| 参数 | 描述 | 类型 | 必填 |
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
## `create-comment`
@@ -116,7 +115,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -132,7 +131,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| body | 新增评论的内容 | string | ✖ |
| contents | 为新增评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
@@ -158,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -189,7 +188,7 @@ jobs:
```yml
- name: Create label
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -215,7 +214,7 @@ jobs:
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -248,7 +247,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -259,7 +258,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| lock-reason | 锁定 issue 的原因 | string | ✖ |
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
@@ -280,7 +279,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -319,7 +318,7 @@ jobs:
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -330,7 +329,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
## `remove-assignees`
@@ -338,7 +337,7 @@ jobs:
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -350,7 +349,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
## `remove-labels`
@@ -359,7 +358,7 @@ jobs:
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -371,7 +370,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| labels | 移除的 labels。当为空字符时不进行移除 | string | ✔ |
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
@@ -382,7 +381,7 @@ jobs:
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -394,7 +393,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
## `unlock-issue`
@@ -403,7 +402,7 @@ jobs:
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -414,7 +413,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
## `update-comment`
@@ -434,7 +433,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -462,7 +461,7 @@ jobs:
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -480,7 +479,7 @@ jobs:
| -- | -- | -- | -- |
| actions | 操作类型 | string | ✔ |
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
| issue-number | 指定的 issue | number | |
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | |
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
| title | 修改 issue 的标题 | string | ✖ |
| body | 修改 issue 的内容 | string | ✖ |
@@ -509,7 +508,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -8,13 +8,14 @@ toc: menu
- Use two-level semantic version, such as v1, v1.1, v2, v2.1
- 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
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2.x 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)
- You can also refer to the update log below to select the version
- The latest v1.x release code will be merged into the 1.x branch
- After the v2 version, the v2 tag is supported, and the latest 2.x code will be synchronized
- It also supports the direct use of branch versions. Such as:
```yml
@@ -25,6 +26,11 @@ toc: menu
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
# or
- name: Issues Helper
uses: actions-cool/issues-helper@v2
```
- v2 [upgrade reference](/en-US/guide/faq)

View File

@@ -8,13 +8,14 @@ toc: menu
- 采用两级语义化版本如v1、v1.1、v2、v2.1
- v1 表示初始版本
- 对 v1 版本的修复和新增会发布到 v1.1 版本
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2.x 版本
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
- 版本选择
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
- 同时也可参照下面的更新日志来选择版本
- 最新的 v1.x release 代码会合并到 1.x 分支中
- v2 版本后支持使用 v2 tag将同步最新 2.x 代码
- 支持直接使用分支版本。如:
```yml
@@ -25,6 +26,11 @@ toc: menu
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
# or
- name: Issues Helper
uses: actions-cool/issues-helper@v2
```
- v2 [升级参考](/guide/faq)

View File

@@ -44,3 +44,7 @@ ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trig
- The owner or collaborator of the warehouse, if there is an organization, including members
- Participants of the issue, including creators and commenters
## Benchmark
For example: I use a Tag to trigger an Action, and the code that triggers the benchmark will follow the Action definition of the code corresponding to this Tag instead of the main branch code.

View File

@@ -45,3 +45,7 @@ ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trig
- 仓库的所有者或协作者,若有组织,包括成员
- issue 的参与者,包括创建者、评论者
## 运行基准
比如:我用 Tag 触发一个 Action触发基准的代码就会走这个 Tag 对应代码的 Action 定义,而非主分支代码。

View File

@@ -38,7 +38,7 @@ jobs:
steps:
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -38,7 +38,7 @@ jobs:
steps:
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v2.2.0
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,6 +2,10 @@
background-color: rgba(0, 0, 0, 0.04) !important;
border-radius: 4px;
box-shadow: inset 0 0 10px 2px rgba(0,0,0,.2);
[data-prefers-color=dark] & {
box-shadow: inset 0 0 10px 2px rgba(0,0,0,.8);
}
}
.__dumi-default-menu {
@@ -54,11 +58,10 @@
}
}
.__dumi-default-layout-features + .__dumi-default-layout-content {
td {
transition: all 0.3s;
&:hover {
box-shadow: 0 1px 2px -2px rgba(0,0,0,.16), 0 3px 6px 0 rgba(0,0,0,.12), 0 5px 12px 4px rgba(0,0,0,.09);
.__dumi-default-layout-hero {
h1 {
[data-prefers-color=dark] & {
color: #000 !important;
}
}
}
@@ -102,6 +105,10 @@
.__dumi-default-menu + .__dumi-default-layout-content {
tbody tr:hover {
background: #fafafa;
[data-prefers-color=dark] & {
background: #2b2b2b;
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "issues-helper",
"version": "2.2.0",
"version": "2.4.3",
"private": true,
"description": "A GitHub Action easily helps you automatically manage issues.",
"main": "src/main.js",
@@ -12,10 +12,12 @@
"deploy": "npm run docs:build && npm run docs:deploy",
"format": "prettier --write **/*.ts **/*.js",
"format-check": "prettier --check **/*.ts **/*.js",
"test": "father test",
"package": "ncc build src/main.js -o dist",
"users": "node ./script/update-users.js",
"main": "node ./src/main.js",
"ver": "node ./script/update-version.js"
"ver": "node ./script/update-version.js",
"pub": "npm run package"
},
"author": "xrkffgg",
"license": "MIT",
@@ -35,15 +37,14 @@
"@actions/github": "^4.0.0",
"@octokit/rest": "^18.0.12",
"dayjs": "^1.9.7",
"father": "^2.30.7",
"lodash": "^4.17.20"
},
"devDependencies": {
"@umijs/fabric": "^2.5.6",
"@vercel/ncc": "^0.25.1",
"common-tags": "^1.8.0",
"dotenv": "^8.2.0",
"dumi": "1.1.7",
"gh-pages": "^3.1.0",
"react": "^17.0.1"
"dumi": "^1.1.26",
"gh-pages": "^3.1.0"
}
}

View File

@@ -5,10 +5,12 @@ const { stripIndent } = require('common-tags');
let { users } = require('../USERS.js');
users.sort((a, b) => getName(a).localeCompare(getName(b)));
users.sort((a, b) => getCurrentName(a).localeCompare(getCurrentName(b)));
// **************************************************************************
const DEFAULT_WIDTH = 46;
// **************************************************************************
let table = '';
let row = users.length / 4;
let lastNo = users.length % 4;
@@ -21,7 +23,14 @@ for (let j = 1; j <= row; j++) {
<td align="center" width="180">${getImg(users[(j - 1) * 4 + 1])}</td>
<td align="center" width="180">${getImg(users[(j - 1) * 4 + 2])}</td>
<td align="center" width="180">${getImg(users[(j - 1) * 4 + 3])}</td>
</tr>`;
</tr>
<tr>
<td align="center" width="180">${getName(users[(j - 1) * 4])}</td>
<td align="center" width="180">${getName(users[(j - 1) * 4 + 1])}</td>
<td align="center" width="180">${getName(users[(j - 1) * 4 + 2])}</td>
<td align="center" width="180">${getName(users[(j - 1) * 4 + 3])}</td>
</tr>
`;
table += data;
}
@@ -34,8 +43,8 @@ ${table}
// **************************************************************************
const point = '<table>';
const cnPoint = `## 列 表`;
const enPoint = `## List`;
const cnPoint = `## ⚡ 反馈`;
const enPoint = `## ⚡ Feedback`;
// **************************************************************************
@@ -65,14 +74,34 @@ function getImg(o) {
if (o) {
return `
<a href="${o.url}">
<img src="${o.logo}" width="46" />
<div>${getName(o)}</div>
</a>`;
<img src="${o.logo}"${getImgWidth(o)}/>
</a>
`;
}
return ``;
}
function getImgWidth(o) {
if (o) {
let width = o.width;
if (width === 'auto') {
width = '';
} else {
width = width ? width : DEFAULT_WIDTH;
}
return ` width="${width}"`;
}
return '';
}
function getName(o) {
if (o) {
return `<a href="${o.url}">${o.url.split('/').slice(-1)[0]}</a>`;
}
return ``;
}
function getCurrentName(o) {
if (o) {
return o.url.split('/').slice(-1)[0];
}

View File

@@ -1,7 +1,7 @@
const { readFileSync, writeFileSync } = require('fs');
const last = /v2\.1\.2/g;
const now = 'v2.2.0';
const last = /v2\.4\.2/g;
const now = `v2`;
let readme = readFileSync('./README.md', 'utf-8');
readme = readme.replace(last, now);

View File

@@ -1,4 +1,3 @@
require('dotenv').config();
const core = require('@actions/core');
const { Octokit } = require('@octokit/rest');
@@ -135,14 +134,10 @@ async function doCloseIssues(owner, repo, labels) {
}
async function doFindComments(owner, repo, issueNumber) {
const res = await octokit.issues.listComments({
owner,
repo,
issue_number: issueNumber,
});
const commentList = await listComments(owner, repo, issueNumber);
core.info(`Actions: [find-comments][${issueNumber}] success!`);
let comments = [];
res.data.forEach(item => {
commentList.forEach(item => {
const a = commentAuth ? item.user.login === commentAuth : true;
const b = bodyIncludes ? item.body.includes(bodyIncludes) : true;
if (a && b) {
@@ -162,6 +157,20 @@ async function doFindComments(owner, repo, issueNumber) {
core.info(`out-comments: ${JSON.stringify(comments)}`);
}
async function listComments(owner, repo, issueNumber, page = 1) {
let { data: comments } = await octokit.issues.listComments({
owner,
repo,
issue_number: issueNumber,
per_page: 100,
page,
});
if (comments.length >= 100) {
comments = comments.concat(await listComments(page + 1));
}
return comments;
}
async function doLockIssues(owner, repo, labels) {
const issues = await doQueryIssues(owner, repo, labels, issueState);

View File

@@ -1,4 +0,0 @@
// Just for dumi style
import './less/main.less';
import './less/markdown.less';
import './less/dumi.less';

4
src/app.ts Normal file
View File

@@ -0,0 +1,4 @@
// For dumi style
import '../less/main.less';
import '../less/markdown.less';
import '../less/dumi.less';

View File

@@ -1,4 +1,3 @@
require('dotenv').config();
const core = require('@actions/core');
const github = require('@actions/github');
const { Octokit } = require('@octokit/rest');
@@ -290,16 +289,27 @@ async function doRemoveAssignees(owner, repo, issueNumber, assignees) {
}
async function doRemoveLabels(owner, repo, issueNumber, labels) {
const dealLabels = dealStringToArr(labels);
for (label of dealLabels) {
const issue = await octokit.issues.get({
owner,
repo,
issue_number: issueNumber,
});
const baseLabels = issue.data.labels.map(({ name }) => name);
const removeLabels = baseLabels.filter(name => dealStringToArr(labels).includes(name));
core.info(`Actions: [filter-labels][${removeLabels.join(',')}] success!`);
for (const label of removeLabels) {
await octokit.issues.removeLabel({
owner,
repo,
issue_number: issueNumber,
name: label,
});
core.info(`Actions: [remove-labels-foreach][${label}] success!`);
core.info(`Actions: [remove-label][${label}] success!`);
}
core.info(`Actions: [remove-labels][${labels}] success!`);
}

View File

@@ -64,10 +64,24 @@ const ALLACTIONS = [
// **************************************************************************
async function main() {
try {
const owner = github.context.repo.owner;
const repo = github.context.repo.repo;
const ctx = github.context;
const issueNumber = core.getInput('issue-number');
// No display to outside
let owner, repo;
if (core.getInput('repo')) {
owner = core.getInput('repo').split('/')[0];
repo = core.getInput('repo').split('/')[1];
} else {
owner = ctx.repo.owner;
repo = ctx.repo.repo;
}
let defaultNo;
if (ctx.eventName === 'issues' || ctx.eventName === 'issue_comment') {
defaultNo = ctx.payload.issue.number;
}
const issueNumber = core.getInput('issue-number') || defaultNo;
const commentId = core.getInput('comment-id');
const defaultBody = `Currently at ${owner}/${repo}. And this is default comment.`;
@@ -90,15 +104,15 @@ async function main() {
const actions = core.getInput('actions', { required: true });
const actionsArr = actions.split(',');
actionsArr.forEach(item => {
testActions(item.trim());
});
for (const action of actionsArr) {
await testActions(action.trim());
}
function testActions(action) {
async function testActions(action) {
if (ALLACTIONS.includes(action)) {
choseActions(action);
await choseActions(action);
} else {
core.setFailed('This actions not supported!');
core.setFailed(`Actions: [${action}] is not supported!`);
}
}

View File

@@ -1,8 +1,7 @@
require('dotenv').config();
const core = require('@actions/core');
const { Octokit } = require('@octokit/rest');
const { getPreMonth } = require('./util.js');
const { getPreMonth, dealStringToArr } = require('./util.js');
// **************************************************************************
var dayjs = require('dayjs');
@@ -24,9 +23,20 @@ const issueMentioned = core.getInput('issue-mentioned');
const bodyIncludes = core.getInput('body-includes');
const titleIncludes = core.getInput('title-includes');
const excludeLabels = core.getInput('exclude-labels');
const inactiveDay = core.getInput('inactive-day');
// **************************************************************************
/**
* 查询 Issues 列表
* @param {*} owner
* @param {*} repo
* @param {*} labels
* @param {*} state
* @param {*} creator
* @returns
*/
async function doQueryIssues(owner, repo, labels, state, creator) {
let params = {
owner,
@@ -50,6 +60,7 @@ async function doQueryIssues(owner, repo, labels, state, creator) {
let issues = [];
let issueNumbers = [];
if (res.length) {
const excludeLabelsArr = dealStringToArr(excludeLabels);
res.forEach(iss => {
const a = bodyIncludes ? iss.body.includes(bodyIncludes) : true;
const b = titleIncludes ? iss.title.includes(titleIncludes) : true;
@@ -59,6 +70,12 @@ async function doQueryIssues(owner, repo, labels, state, creator) {
* You can identify pull requests by the pull_request key.
*/
if (a && b && iss.pull_request === undefined) {
if (excludeLabelsArr.length) {
for (let i = 0; i < iss.labels.length; i += 1) {
if (excludeLabelsArr.includes(iss.labels[i].name)) return;
}
}
if (inactiveDay) {
let lastTime = dayjs.utc().subtract(Number(inactiveDay), 'day');
let updateTime = dayjs.utc(iss.updated_at);

45
tests/public.test.js Normal file
View File

@@ -0,0 +1,45 @@
describe('Test Public', () => {
it('test query', () => {
const issues = [
{
id: 0,
labels: [{ name: '0' }, { name: '1' }],
},
{
id: 1,
labels: [{ name: '1' }, { name: '2' }],
},
{
id: 2,
labels: [{ name: '2' }, { name: '3' }],
},
{
id: 3,
labels: [{ name: '1' }, { name: '4' }],
},
{
id: 4,
labels: [{ name: '1' }, { name: '3' }],
},
{
id: 5,
labels: [{ name: '1' }, { name: '5' }],
},
];
let ex = ['2', '4'];
let r = [];
issues.forEach(iss => {
for (let i = 0; i < iss.labels.length; i += 1) {
if (ex.includes(iss.labels[i].name)) return;
}
r.push(iss);
});
expect(r[0].id).toEqual(0);
expect(r[1].id).toEqual(4);
expect(r[2].id).toEqual(5);
expect(r.length).toEqual(3);
});
});

16618
yarn.lock

File diff suppressed because it is too large Load Diff