Compare commits

...

21 Commits

Author SHA1 Message Date
元凛
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
xrkffgg
89884a3a50 Delete gh-pages.yml 2021-03-21 18:07:20 +08:00
xrkffgg
1d2d39036b refactor: change to title-excludes 2021-03-21 17:57:14 +08:00
xrkffgg
a66760a95f feat: add title-remove for check-issue (#65)
* feat: add title-remove for check-issue

* add doc
2021-03-21 13:23:21 +08:00
xrkffgg
8abd4b29f8 docs: fix title 2021-03-18 22:02:48 +08:00
xrkffgg
03203f3b5e chore: update dumi version 2021-03-14 00:51:04 +08:00
xrkffgg
0acc9bec8c docs: add branding web 2021-02-23 17:20:33 +08:00
xrkffgg
56afcb6a23 docs: add dingding 2021-02-21 16:10:57 +08:00
36 changed files with 18874 additions and 3608 deletions

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

View File

@@ -1,8 +1,10 @@
name: github pages
name: GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest

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

@@ -4,7 +4,7 @@ import { defineConfig } from 'dumi';
const name = 'issues-helper';
export default defineConfig({
title: 'Issue Helper',
title: 'Issues Helper',
mode: 'site',
favicon: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
logo: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',

View File

@@ -1,4 +1,28 @@
# Changelog
<!--
🐞 Bug fix
🚀 New feature
💄 Perf
📝 Docs
⚡️ Code style
-->
## 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
`2021.03.21`
- feat: Added `title-excludes` parameter to `check-issue`. [#65](https://github.com/actions-cool/issues-helper/pull/65)
## v2.1.2

View File

@@ -32,82 +32,122 @@ 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://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg" 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/jdf2e/nutui">
<img src="https://img14.360buyimg.com/imagetools/s200x200_jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" 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/jdf2e/nutui">nutui</a></td>
</tr><tr>
<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://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true" 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>
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46"/>
</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://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true" width="46"/>
</a>
</td>
</tr>
<tr>
<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>
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/umijs/umi">
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
</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://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.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>
<td align="center" width="180"></td>
<td align="center" width="180"></td>
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
</a>
</td>
</tr>
<tr>
<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>
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
</tr>
</table>
## ⚡ Feedback
You are very welcome to try it out and put forward your comments. You can use the following methods:
- Report bugs or consult with [Issue](https://github.com/actions-cool/issues-helper/issues)
- Discuss via [Discussions](https://github.com/actions-cool/issues-helper/discussions)
- Submit [Pull Request](https://github.com/actions-cool/issues-helper/pulls) to improve the code of `issues-helper`
## List
When the following list does not have the features you want, you can submit it in [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18).
@@ -162,7 +202,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -204,7 +244,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -229,7 +269,7 @@ Close the specified issue.
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -262,7 +302,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -306,7 +346,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -339,7 +379,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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -367,7 +407,7 @@ According to [`comment-id`](#comment-id) delete the specified comment.
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -402,7 +442,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -436,7 +476,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -471,7 +511,7 @@ Open the specified issue.
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -492,7 +532,7 @@ Remove the person designated by issue.
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -515,7 +555,7 @@ Remove the specified labels.
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -540,7 +580,7 @@ Replace the labels of issue.
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -563,7 +603,7 @@ Unlock the specified issue.
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -596,7 +636,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -626,7 +666,7 @@ Update the specified issue according to the `issue-number`.
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -676,7 +716,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -719,7 +759,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -741,6 +781,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`
@@ -772,7 +813,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -788,6 +829,7 @@ jobs:
| issue-number | The number of issue | 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 | ✖ |
| body-includes | Body contains check | string | ✖ |
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
@@ -811,7 +853,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -832,6 +874,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
@@ -845,7 +888,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
```yml
- name: Find comments
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -893,7 +936,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -916,6 +959,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`
@@ -940,7 +984,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -985,7 +1029,7 @@ jobs:
if: github.event.label.name == 'watch'
steps:
- name: find comments
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
id: fcid
with:
actions: 'find-comments'
@@ -1000,7 +1044,7 @@ jobs:
- name: create comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1011,7 +1055,7 @@ jobs:
- name: update comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1052,7 +1096,7 @@ When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`,
```yml
- name: Create issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
id: createissue
with:
actions: 'create-issue'
@@ -1151,14 +1195,6 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
- Personal exercises and tests [Actions](https://github.com/actions-cool/test-issues-helper) repository
- Can also refer to the warehouse of [online users](#who-is-using)
## ⚡ Feedback
You are very welcome to try it out and put forward your comments. You can use the following methods:
- Report bugs or consult with [Issue](https://github.com/actions-cool/issues-helper/issues)
- Discuss via [Discussions](https://github.com/actions-cool/issues-helper/discussions)
- Submit [Pull Request](https://github.com/actions-cool/issues-helper/pulls) to improve the code of `issues-helper`
## LICENSE
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)

208
README.md
View File

@@ -32,82 +32,126 @@
<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://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg" 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/jdf2e/nutui">
<img src="https://img14.360buyimg.com/imagetools/s200x200_jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" 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/jdf2e/nutui">nutui</a></td>
</tr><tr>
<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://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true" 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>
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46"/>
</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://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true" width="46"/>
</a>
</td>
</tr>
<tr>
<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>
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/umijs/umi">
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
</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://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.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>
<td align="center" width="180"></td>
<td align="center" width="180"></td>
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
</a>
</td>
</tr>
<tr>
<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>
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
</tr>
</table>
## ⚡ 反馈
非常欢迎你来尝试使用,并提出意见,你可以通过以下方式:
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码
也欢迎加入 钉钉交流群
![](https://github.com/actions-cool/resources/blob/main/dingding.jpeg?raw=true)
## 列 表
当以下列表没有你想要的功能时,可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
@@ -162,7 +206,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -204,7 +248,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -229,7 +273,7 @@ jobs:
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -262,7 +306,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -306,7 +350,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -339,7 +383,7 @@ jobs:
```yml
- name: Create label
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -367,7 +411,7 @@ jobs:
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -402,7 +446,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -436,7 +480,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -471,7 +515,7 @@ jobs:
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -492,7 +536,7 @@ jobs:
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -515,7 +559,7 @@ jobs:
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -540,7 +584,7 @@ jobs:
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -563,7 +607,7 @@ jobs:
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -596,7 +640,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -626,7 +670,7 @@ jobs:
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -674,7 +718,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -717,7 +761,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -739,6 +783,7 @@ jobs:
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| inactive-label | 新增标签名称 | string | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
@@ -766,7 +811,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -782,6 +827,7 @@ jobs:
| issue-number | 指定的 issue | number | ✔ |
| assignee-includes | 是否包含指定人 | string | ✖ |
| title-includes | 标题包含校验 | string | ✖ |
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
| body-includes | 内容包含校验 | string | ✖ |
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
@@ -805,7 +851,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -826,6 +872,7 @@ jobs:
| body-includes | 包含内容筛选 | string | ✖ |
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
@@ -839,7 +886,7 @@ jobs:
```yml
- name: Find comments
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -887,7 +934,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -910,6 +957,7 @@ jobs:
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| lock-reason | 锁定 issue 的原因 | string | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
@@ -934,7 +982,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -979,7 +1027,7 @@ jobs:
if: github.event.label.name == 'watch'
steps:
- name: find comments
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
id: fcid
with:
actions: 'find-comments'
@@ -994,7 +1042,7 @@ jobs:
- name: create comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1005,7 +1053,7 @@ jobs:
- name: update comment
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -1046,7 +1094,7 @@ jobs:
```yml
- name: Create issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
id: createissue
with:
actions: 'create-issue'
@@ -1146,14 +1194,6 @@ x2 + y2
- 个人练习和测试 [Actions](https://github.com/actions-cool/test-issues-helper) 的仓库
- 也可以来 [线上使用者](#谁在使用) 的仓库参照
## ⚡ 反馈
非常欢迎你来尝试使用,并提出意见,你可以通过以下方式:
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码
## LICENSE
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)

View File

@@ -1,5 +1,12 @@
// **************************************************************************
// Add to end
/**
* @param {string} url github地址
* @param {string} logo logo地址
* @param {string} width 自定义宽度
*/
const users = [
{
url: 'https://github.com/ant-design/ant-design',
@@ -47,15 +54,24 @@ 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://github.com/prettier/prettier-logo/blob/master/images/prettier-icon-light.png?raw=true',
},
{
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/s200x200_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',
},
];

View File

@@ -1,9 +1,12 @@
name: 'Issues Helper'
description: 'A GitHub Action that easily helps you automatically manage issues'
author: 'xrkffgg'
# https://actions-cool.github.io/github-action-branding/
branding:
icon: 'message-square'
color: 'black'
inputs:
actions:
description: 'Action name'
@@ -50,6 +53,9 @@ inputs:
description: 'Check use'
body-includes:
description: 'Query use'
# check
title-excludes:
description: 'Remove some to check title whether empty.'
title-includes:
description: 'Query use'
issue-creator:
@@ -68,6 +74,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:
@@ -82,6 +91,7 @@ inputs:
description: 'For month-statistics'
count-comments:
description: 'For month-statistics'
outputs:
issue-number:
description: 'Create Issue Number'
@@ -91,6 +101,7 @@ outputs:
description: 'Find comments'
check-result:
description: 'Check issue'
runs:
using: node12
main: 'dist/index.js'

3602
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.1.2
uses: actions-cool/issues-helper@v2.3.0
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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -89,6 +90,7 @@ jobs:
| issue-number | The number of issue | 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 | ✖ |
| body-includes | Body contains check | string | ✖ |
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
@@ -110,7 +112,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -131,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
@@ -142,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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -188,7 +191,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -211,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`
@@ -233,7 +237,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
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.1.2
uses: actions-cool/issues-helper@v2.3.0
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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,6 +86,7 @@ jobs:
| issue-number | 指定的 issue | number | ✔ |
| assignee-includes | 是否包含指定人 | string | ✖ |
| title-includes | 标题包含校验 | string | ✖ |
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
| body-includes | 内容包含校验 | string | ✖ |
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
@@ -106,7 +108,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -127,6 +129,7 @@ jobs:
| body-includes | 包含内容筛选 | string | ✖ |
| title-includes | 包含标题筛选 | string | ✖ |
| inactive-day | 非活跃天数筛选 | number | ✖ |
| exclude-labels | 排除标签筛选 | string | ✖ |
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
@@ -138,7 +141,7 @@ jobs:
```yml
- name: Find comments
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -184,7 +187,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -207,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`
@@ -229,7 +233,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -62,7 +62,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,7 +85,7 @@ Close the specified issue.
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -116,7 +116,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -158,7 +158,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -189,7 +189,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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -215,7 +215,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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -248,7 +248,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -280,7 +280,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -319,7 +319,7 @@ Open the specified issue.
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -338,7 +338,7 @@ Remove the person designated by issue.
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -359,7 +359,7 @@ Remove the specified labels.
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -382,7 +382,7 @@ Replace the labels of issue.
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -403,7 +403,7 @@ Unlock the specified issue.
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -434,7 +434,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -462,7 +462,7 @@ Update the specified issue according to the `issue-number`.
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -510,7 +510,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -62,7 +62,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,7 +85,7 @@ jobs:
```yml
- name: Close issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -116,7 +116,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -158,7 +158,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -189,7 +189,7 @@ jobs:
```yml
- name: Create label
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-label'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -215,7 +215,7 @@ jobs:
```yml
- name: Delete comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -248,7 +248,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -280,7 +280,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -319,7 +319,7 @@ jobs:
```yml
- name: Open issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -338,7 +338,7 @@ jobs:
```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -359,7 +359,7 @@ jobs:
```yml
- name: Remove labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -382,7 +382,7 @@ jobs:
```yml
- name: Set labels
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -403,7 +403,7 @@ jobs:
```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -434,7 +434,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -462,7 +462,7 @@ jobs:
```yml
- name: Update issue
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -509,7 +509,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v2.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}

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.1.2
uses: actions-cool/issues-helper@v2.3.0
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.1.2
uses: actions-cool/issues-helper@v2.3.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -60,3 +60,7 @@ jobs:
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码
也欢迎加入 钉钉交流群
![](https://github.com/actions-cool/resources/blob/main/dingding.jpeg?raw=true)

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,8 +1,8 @@
{
"name": "issues-helper",
"version": "2.1.2",
"version": "2.3.0",
"private": true,
"description": "Some operations on issue.",
"description": "A GitHub Action easily helps you automatically manage issues.",
"main": "src/main.js",
"scripts": {
"start": "dumi dev",
@@ -12,6 +12,7 @@
"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",
@@ -35,15 +36,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.1",
"gh-pages": "^3.1.0",
"react": "^17.0.1"
"dumi": "^1.1.18",
"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,9 @@
const { readFileSync, writeFileSync } = require('fs');
const last = /v2\.1\.1/g;
const now = 'v2.1.2';
const { version } = JSON.parse(readFileSync('./package.json', 'utf-8'));
const last = /v2\.2\.1/g;
const now = `v${version}`;
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');
@@ -28,6 +27,7 @@ direction = direction === 'desc' ? 'desc' : 'asc';
const commentAuth = core.getInput('comment-auth');
const bodyIncludes = core.getInput('body-includes');
const titleIncludes = core.getInput('title-includes');
const titleRemove = core.getInput('title-excludes');
const assigneeIncludes = core.getInput('assignee-includes');
let issueState = core.getInput('issue-state') || 'open';
@@ -67,7 +67,7 @@ async function doCheckInactive(owner, repo, labels) {
* 关键字匹配,是否包含前一个某个+后一个某个 '官网,网站/挂了,无法访问'
*/
async function doCheckIssue(owner, repo, issueNumber) {
var checkResult = true;
let checkResult = true;
const issue = await octokit.issues.get({
owner,
repo,
@@ -86,6 +86,17 @@ async function doCheckIssue(owner, repo, issueNumber) {
!checkAssignee ? (checkResult = false) : null;
}
if (!!checkResult && titleRemove) {
const removes = dealStringToArr(titleRemove);
let t = issue.data.title;
removes.forEach(re => {
t = t.replace(re, '');
});
if (t.trim().length == 0) {
checkResult = false;
}
}
if (!!checkResult && titleIncludes) {
const titleArr = titleIncludes.split('/');
const keyword1 = dealStringToArr(titleArr[0]);
@@ -123,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) {
@@ -150,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);
@@ -209,9 +230,7 @@ async function doMonthStatistics(owner, repo, labels, assignees) {
});
}
}
let now = dayjs()
.utc()
.format('YYYY-MM-DD HH:mm:ss');
let now = dayjs().utc().format('YYYY-MM-DD HH:mm:ss');
let body = `
- Created time: ${now}

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 @@
// Just 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');

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,
@@ -59,6 +69,13 @@ 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 (excludeLabels) {
const labels = dealStringToArr(excludeLabels);
for (let i = 0; i < iss.labels.length; i += 1) {
if (labels.includes(iss.labels[i].name)) return;
}
}
if (inactiveDay) {
let lastTime = dayjs.utc().subtract(Number(inactiveDay), 'day');
let updateTime = dayjs.utc(iss.updated_at);
@@ -110,11 +127,7 @@ async function getIssuesInMonth(owner, repo, thisMonth, page = 1) {
// **************************************************************************
function getCreatedMonth(d) {
return (
dayjs(d)
.utc()
.month() + 1
);
return dayjs(d).utc().month() + 1;
}
// **************************************************************************

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);
});
});

17884
yarn.lock

File diff suppressed because it is too large Load Diff