mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
11acd15e70 | ||
![]() |
7619e79b94 | ||
![]() |
c7cf5de709 | ||
![]() |
273b6abb78 | ||
![]() |
87bca14eb5 | ||
![]() |
8e05706e43 | ||
![]() |
3836013160 | ||
![]() |
fd98f44d05 | ||
![]() |
0396471168 |
@@ -21,7 +21,7 @@ export default defineConfig({
|
||||
['en-US', 'English'],
|
||||
],
|
||||
theme: {
|
||||
'@c-primary': '#42a5f5',
|
||||
'@c-primary': '#1890ff',
|
||||
},
|
||||
navs: {
|
||||
'zh-CN': [
|
||||
|
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,3 +1,22 @@
|
||||
## v1.11
|
||||
|
||||
`2021.01.14`
|
||||
|
||||
- feat: add question mark duplicate. [#38](https://github.com/actions-cool/issues-helper/pull/38)
|
||||
- perf: expand duplicate action. [#40](https://github.com/actions-cool/issues-helper/pull/40)
|
||||
|
||||
## v1.10
|
||||
|
||||
`2021.01.12`
|
||||
|
||||
- fix: duplicate labels set. [#36](https://github.com/actions-cool/issues-helper/pull/36)
|
||||
|
||||
## v1.9
|
||||
|
||||
`2021.01.11`
|
||||
|
||||
- feat: add random to. [#35](https://github.com/actions-cool/issues-helper/pull/35)
|
||||
|
||||
## v1.8
|
||||
|
||||
`2021.01.07`
|
||||
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 xrkffgg
|
||||
Copyright (c) 2020-present xrkffgg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
188
README.en-US.md
188
README.en-US.md
@@ -22,6 +22,65 @@ A GitHub Action that easily helps you automatically manage issues
|
||||
|
||||
> Private projects have a limit of 2000 times per month. [Specific view](https://github.com/settings/billing). Public are unlimited.
|
||||
|
||||
## Who is using?
|
||||
|
||||
Please leave a message at [**here**](https://github.com/actions-cool/issues-helper/issues/6).
|
||||
|
||||
<table>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</tr><tr>
|
||||
<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>
|
||||
<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/AttoJS/vue-request">
|
||||
<img src="https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png" width="46" />
|
||||
<div>vue-request</div>
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<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>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 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).
|
||||
@@ -75,12 +134,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xxx' or 'xx1,xx2'
|
||||
random-to: 1
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
@@ -89,6 +149,7 @@ jobs:
|
||||
| token | [Token explain](#token) | string | ✔ |
|
||||
| issue-number | The number of issue | 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 | ✖ |
|
||||
|
||||
- `actions` support multiple and separated by comma. Like: `add-assignees,add-labels`
|
||||
- The `name` can be modified according to the actual situation
|
||||
@@ -115,7 +176,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -140,7 +201,7 @@ Close the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -173,7 +234,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -217,7 +278,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -236,6 +297,7 @@ jobs:
|
||||
| body | The body of the new issue | string | ✖ |
|
||||
| labels | The labels for the new issue | string | ✖ |
|
||||
| assignees | The assignees for the new issue | string | ✖ |
|
||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
||||
|
||||
- `title` default is `Default Title`
|
||||
@@ -249,7 +311,7 @@ According to [`comment-id`](#comment-id) delete the specified comment.
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -281,7 +343,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -298,21 +360,21 @@ jobs:
|
||||
|
||||
#### `mark-duplicate`
|
||||
|
||||
Quickly mark duplicate questions, only for issue new comments.
|
||||
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -329,7 +391,8 @@ jobs:
|
||||
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
|
||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||
|
||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`
|
||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||
- `labels`: Highest priority
|
||||
- `close-issue`: Both `true` or `'true'` can take effect
|
||||
|
||||
⏫ [Back to list](#List)
|
||||
@@ -340,7 +403,7 @@ Open the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -361,7 +424,7 @@ Remove the person designated by issue.
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -384,7 +447,7 @@ Remove the specified labels.
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -409,7 +472,7 @@ Replace the labels of issue.
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -432,7 +495,7 @@ Unlock the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -465,7 +528,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -493,7 +556,7 @@ Update the specified issue according to the `issue-number`.
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -543,7 +606,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -586,7 +649,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -639,7 +702,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -678,7 +741,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -712,7 +775,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@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -760,7 +823,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -806,7 +869,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -849,7 +912,7 @@ jobs:
|
||||
if: github.event.label.name == 'watch'
|
||||
steps:
|
||||
- name: find comments
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: fcid
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
@@ -860,7 +923,7 @@ jobs:
|
||||
|
||||
- name: create comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -869,7 +932,7 @@ jobs:
|
||||
|
||||
- name: update comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -901,7 +964,7 @@ When the token is not filled in actions or the corresponding secrets are not add
|
||||
|
||||
```yml
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: createissue
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
@@ -975,78 +1038,37 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
|
||||
- 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, 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 version
|
||||
|
||||
- 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
|
||||
- It also supports the direct use of branch versions. Such as:
|
||||
|
||||
```yml
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@main
|
||||
|
||||
# or
|
||||
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
```
|
||||
|
||||
## Actions Template
|
||||
|
||||
- You can directly use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repositorie template
|
||||
|
||||
- Personal exercises and tests [Actions](https://github.com/xrkffgg/test-ci) repository
|
||||
- Can also refer to the warehouse of [online users](#who-is-using)
|
||||
|
||||
## 💖 Who is using?
|
||||
## ⚡ Feedback
|
||||
|
||||
You can come to the following repositories for reference. Please leave a message at [**here**](https://github.com/actions-cool/issues-helper/issues/6).
|
||||
You are very welcome to try it out and put forward your comments. You can use the following methods:
|
||||
|
||||
At the same time, if you have any questions during use, you can also ask and inquire in the issue or discussion.
|
||||
|
||||
<table>
|
||||
<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" />
|
||||
<br />
|
||||
ant-design
|
||||
</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" />
|
||||
<br />
|
||||
ant-design-vue
|
||||
</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" />
|
||||
<br />
|
||||
dumi
|
||||
</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" />
|
||||
<br />
|
||||
material-ui
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/lijinke666/react-music-player">
|
||||
<img src="https://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true" width="46" />
|
||||
<br />
|
||||
react-music-player
|
||||
</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" />
|
||||
<br />
|
||||
umi
|
||||
</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" />
|
||||
<br />
|
||||
vue-request
|
||||
</a></td>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
- 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
|
||||
|
||||
|
190
README.md
190
README.md
@@ -22,6 +22,65 @@
|
||||
|
||||
> Private 项目每月有 2000 次的限制,[具体查看](https://github.com/settings/billing)。Public 项目无限制。
|
||||
|
||||
## 谁在使用?
|
||||
|
||||
欢迎在 [**这里**](https://github.com/actions-cool/issues-helper/issues/6) 留言。
|
||||
|
||||
<table>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</tr><tr>
|
||||
<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>
|
||||
<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/AttoJS/vue-request">
|
||||
<img src="https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png" width="46" />
|
||||
<div>vue-request</div>
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<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>
|
||||
<td align="center" width="180"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 列 表
|
||||
|
||||
当以下列表没有你想要的功能时,可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
|
||||
@@ -75,12 +134,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xxx' or 'xx1,xx2'
|
||||
random-to: 1
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
@@ -89,6 +149,7 @@ jobs:
|
||||
| token | [token 说明](#token) | string | ✔ |
|
||||
| issue-number | 指定的 issue | number | ✔ |
|
||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||
|
||||
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
||||
- 其中的 `name` 可根据自行根据实际情况修改
|
||||
@@ -115,7 +176,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -140,7 +201,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -173,7 +234,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -217,7 +278,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -236,6 +297,7 @@ jobs:
|
||||
| body | 新增 issue 的内容 | string | ✖ |
|
||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||
| contents | 为新增 issue 增加 [reaction](#reactions-types) | string | ✖ |
|
||||
|
||||
- `title` 默认为:`Default Title`
|
||||
@@ -249,7 +311,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -281,7 +343,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -298,21 +360,21 @@ jobs:
|
||||
|
||||
#### `mark-duplicate`
|
||||
|
||||
快捷标记重复问题,仅作用于 issue 新增评论。
|
||||
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -329,7 +391,8 @@ jobs:
|
||||
| contents | 为该评论的增加 [reaction](#reactions-types) | string | ✖ |
|
||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||
|
||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`
|
||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||
- `labels`:优先级最高
|
||||
- `close-issue`:`true` 或 `'true'` 均可生效
|
||||
|
||||
⏫ [返回列表](#列-表)
|
||||
@@ -340,7 +403,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -361,7 +424,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -384,7 +447,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -409,7 +472,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -432,7 +495,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -465,7 +528,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -493,7 +556,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -541,7 +604,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -584,7 +647,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -633,7 +696,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -672,7 +735,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -706,7 +769,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -754,7 +817,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -800,7 +863,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -843,7 +906,7 @@ jobs:
|
||||
if: github.event.label.name == 'watch'
|
||||
steps:
|
||||
- name: find comments
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: fcid
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
@@ -854,7 +917,7 @@ jobs:
|
||||
|
||||
- name: create comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -863,7 +926,7 @@ jobs:
|
||||
|
||||
- name: update comment
|
||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -895,7 +958,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
id: createissue
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
@@ -970,78 +1033,37 @@ x2 + y2
|
||||
- 采用两级语义化版本,如v1、v1.1、v2、v2.1
|
||||
- v1 表示初始版本
|
||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
||||
- 当发布的 v1.x 运行一定时间稳定后,发布进阶 v2 版本
|
||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
||||
|
||||
- 版本选择
|
||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
||||
- 同时也可参照下面的更新日志来选择版本
|
||||
- 也支持直接使用分支版本。如:
|
||||
- 最新的 v1.x release 代码会合并到 1.x 分支中
|
||||
- 支持直接使用分支版本。如:
|
||||
|
||||
```yml
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@main
|
||||
|
||||
# or
|
||||
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
```
|
||||
|
||||
## Actions 模板
|
||||
|
||||
- 可直接使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
||||
|
||||
- 个人练习和测试 [Actions](https://github.com/xrkffgg/test-ci) 的仓库
|
||||
- 也可以来 [线上使用者](#谁在使用) 的仓库参照
|
||||
|
||||
## 💖 谁在使用?
|
||||
## ⚡ 反馈
|
||||
|
||||
你可以来以下项目进行参考。欢迎在 [**这里**](https://github.com/actions-cool/issues-helper/issues/6) 留言。
|
||||
非常欢迎你来尝试使用,并提出意见,你可以通过以下方式:
|
||||
|
||||
同时,如果你在使用过程中有什么疑问,也可以在 issue 或者 discussion 中进行提问和查询。
|
||||
|
||||
<table>
|
||||
<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" />
|
||||
<br />
|
||||
ant-design
|
||||
</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" />
|
||||
<br />
|
||||
ant-design-vue
|
||||
</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" />
|
||||
<br />
|
||||
dumi
|
||||
</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" />
|
||||
<br />
|
||||
material-ui
|
||||
</a></td>
|
||||
</tr><tr>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/lijinke666/react-music-player">
|
||||
<img src="https://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true" width="46" />
|
||||
<br />
|
||||
react-music-player
|
||||
</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" />
|
||||
<br />
|
||||
umi
|
||||
</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" />
|
||||
<br />
|
||||
vue-request
|
||||
</a></td>
|
||||
<td align="center" width="180"></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` 的代码
|
||||
|
||||
## LICENSE
|
||||
|
||||
|
11
USERS.js
11
USERS.js
@@ -1,7 +1,5 @@
|
||||
// **************************************************************************
|
||||
|
||||
// Add to end
|
||||
|
||||
const users = [
|
||||
{
|
||||
url: 'https://github.com/ant-design/ant-design',
|
||||
@@ -31,10 +29,17 @@ 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'
|
||||
},
|
||||
{
|
||||
url: 'https://github.com/ant-design-blazor/ant-design-blazor',
|
||||
logo: 'https://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg'
|
||||
},
|
||||
{
|
||||
url: 'https://github.com/zoo-js/zoo',
|
||||
logo: 'https://avatars1.githubusercontent.com/u/70757173?s=200&v=4'
|
||||
},
|
||||
];
|
||||
|
||||
// **************************************************************************
|
||||
|
||||
module.exports = {
|
||||
users
|
||||
};
|
||||
|
@@ -20,6 +20,8 @@ inputs:
|
||||
description: 'Issue title'
|
||||
assignees:
|
||||
description: 'Issue assignees'
|
||||
random-to:
|
||||
description: 'Issue assignees random to'
|
||||
labels:
|
||||
description: 'Issue labels'
|
||||
state:
|
||||
|
1740
dist/index.js
vendored
1740
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -142,7 +142,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -232,7 +232,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check-issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: close-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -138,7 +138,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Find comments
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'find-comments'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: lock-issues
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issues'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -228,7 +228,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: month-statistics
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -22,12 +22,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xxx' or 'xx1,xx2'
|
||||
random-to: 1
|
||||
```
|
||||
|
||||
| Param | Desc | Type | Required |
|
||||
@@ -36,6 +37,7 @@ jobs:
|
||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||
| issue-number | The number of issue | 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 | ✖ |
|
||||
|
||||
- `actions` support multiple and separated by comma. Like: `add-assignees,add-labels`
|
||||
- The `name` can be modified according to the actual situation
|
||||
@@ -60,7 +62,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -83,7 +85,7 @@ Close the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -114,7 +116,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -156,7 +158,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -175,6 +177,7 @@ jobs:
|
||||
| body | The body of the new issue | string | ✖ |
|
||||
| labels | The labels for the new issue | string | ✖ |
|
||||
| assignees | The assignees for the new issue | string | ✖ |
|
||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
||||
|
||||
- `title` default is `Default Title`
|
||||
@@ -186,7 +189,7 @@ According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified c
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -216,7 +219,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -231,21 +234,21 @@ jobs:
|
||||
|
||||
## `mark-duplicate`
|
||||
|
||||
Quickly mark duplicate questions, only for issue new comments.
|
||||
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -262,7 +265,8 @@ jobs:
|
||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
|
||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||
|
||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`
|
||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||
- `labels`: Highest priority
|
||||
- `close-issue`: Both `true` or `'true'` can take effect
|
||||
|
||||
<Alert>
|
||||
@@ -277,7 +281,7 @@ Open the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -296,7 +300,7 @@ Remove the person designated by issue.
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -317,7 +321,7 @@ Remove the specified labels.
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -340,7 +344,7 @@ Replace the labels of issue.
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -361,7 +365,7 @@ Unlock the specified issue.
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -392,7 +396,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -418,7 +422,7 @@ Update the specified issue according to the `issue-number`.
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -466,7 +470,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
42
docs/base.md
42
docs/base.md
@@ -22,12 +22,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add assigness
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
assignees: 'xxx' or 'xx1,xx2'
|
||||
random-to: 1
|
||||
```
|
||||
|
||||
| 参数 | 描述 | 类型 | 必填 |
|
||||
@@ -36,6 +37,7 @@ jobs:
|
||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||
| issue-number | 指定的 issue | number | ✔ |
|
||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||
|
||||
- `actions` 支持多个,需用逗号隔开。如:`add-assignees,add-labels`
|
||||
- 其中的 `name` 可根据自行根据实际情况修改
|
||||
@@ -60,7 +62,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'xxx') == false
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -83,7 +85,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Close issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -114,7 +116,7 @@ jobs:
|
||||
if: github.event.label.name == 'xxx'
|
||||
steps:
|
||||
- name: Create comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -156,7 +158,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -175,6 +177,7 @@ jobs:
|
||||
| body | 新增 issue 的内容 | string | ✖ |
|
||||
| labels | 为新增 issue 添加 labels | string | ✖ |
|
||||
| assignees | 为新增 issue 添加 assignees | string | ✖ |
|
||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||
| contents | 为新增 issue 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
||||
|
||||
- `title` 默认为:`Default Title`
|
||||
@@ -186,7 +189,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Delete comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'delete-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -216,7 +219,7 @@ jobs:
|
||||
if: github.event.label.name == 'invalid'
|
||||
steps:
|
||||
- name: Lock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'lock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -231,21 +234,21 @@ jobs:
|
||||
|
||||
## `mark-duplicate`
|
||||
|
||||
快捷标记重复问题,仅作用于 issue 新增评论。
|
||||
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: mark-duplicate
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'mark-duplicate'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -262,7 +265,8 @@ jobs:
|
||||
| contents | 为该评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||
|
||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`
|
||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||
- `labels`:优先级最高
|
||||
- `close-issue`:`true` 或 `'true'` 均可生效
|
||||
|
||||
<Alert>
|
||||
@@ -277,7 +281,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Open issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'open-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -296,7 +300,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove assignees
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-assignees'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -317,7 +321,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Remove labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -340,7 +344,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Set labels
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'set-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -361,7 +365,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Unlock issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'unlock-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -392,7 +396,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update comment
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -418,7 +422,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- name: Update issue
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'update-issue'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -465,7 +469,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: welcome
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'welcome'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@@ -8,16 +8,22 @@ 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, 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 version
|
||||
|
||||
- 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
|
||||
- It also supports the direct use of branch versions. Such as:
|
||||
|
||||
```yml
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@main
|
||||
|
||||
# or
|
||||
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
```
|
||||
|
||||
<embed src="../CHANGELOG.md"></embed>
|
||||
|
@@ -8,16 +8,22 @@ toc: menu
|
||||
- 采用两级语义化版本,如v1、v1.1、v2、v2.1
|
||||
- v1 表示初始版本
|
||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
||||
- 当发布的 v1.x 运行一定时间稳定后,发布进阶 v2 版本
|
||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
||||
|
||||
- 版本选择
|
||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
||||
- 同时也可参照下面的更新日志来选择版本
|
||||
- 也支持直接使用分支版本。如:
|
||||
- 最新的 v1.x release 代码会合并到 1.x 分支中
|
||||
- 支持直接使用分支版本。如:
|
||||
|
||||
```yml
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@main
|
||||
|
||||
# or
|
||||
|
||||
- name: Issues Helper
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
```
|
||||
|
||||
<embed src="../CHANGELOG.md"></embed>
|
||||
|
@@ -17,8 +17,28 @@ if: contains(github.event.issue.body, 'ie') == false
|
||||
|
||||
[More](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#functions).
|
||||
|
||||
## Pass value and output in `yml`
|
||||
|
||||
```
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
count-lables: 'true'
|
||||
```
|
||||
|
||||
- `count-lables`: Regardless of setting `true` or `'ture'`, all received in the program is in string format
|
||||
|
||||
At the same time, the output is also in string format
|
||||
|
||||
- `check-result`: The judgment condition is `if: steps.xxid.outputs.check-result =='true'`
|
||||
|
||||
## `GitHub Actions bot` trigger
|
||||
|
||||
When an action is set, such as adding a label `x1` to an issue, Actions will automatically add a label `x2` to the issue.
|
||||
|
||||
But if this is done by `GitHub Actions bot` (that is, the token in the actions is not passed, or the default `token: ${{ secrets.GITHUB_TOKEN }}` is used), the actions of label `x2` will not be triggered.
|
||||
|
||||
## `assignees` scope
|
||||
|
||||
- The owner or collaborator of the warehouse, if there is an organization, including members
|
||||
- Participants of the issue, including creators and commenters
|
||||
|
@@ -18,8 +18,28 @@ if: contains(github.event.issue.body, 'ie') == false
|
||||
|
||||
更多[查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#functions)。
|
||||
|
||||
## `yml` 中传值和输出
|
||||
|
||||
```
|
||||
with:
|
||||
actions: 'month-statistics'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
count-lables: 'true'
|
||||
```
|
||||
|
||||
- `count-lables`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
|
||||
|
||||
同时输出的也是字符串格式
|
||||
|
||||
- `check-result`:判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
|
||||
|
||||
## `GitHub Actions bot` 触发
|
||||
|
||||
当设置了一个 Actions,如为给一个 issue 新增 label `x1` 时,Actions 自动为该 issue 增加 `x2` label。
|
||||
|
||||
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
|
||||
|
||||
## `assignees` 范围
|
||||
|
||||
- 仓库的所有者或协作者,若有组织,包括成员
|
||||
- issue 的参与者,包括创建者、评论者
|
||||
|
@@ -33,7 +33,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v1.2
|
||||
uses: actions-cool/issues-helper@1.x
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
- `on`:action 触发条件
|
||||
- 参考 [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||
- `uses`:使用 actions 名称
|
||||
- `uses: actions-cool/issues-helper@v1.2`。版本选择请 [参考](/changelog)
|
||||
- `uses: actions-cool/issues-helper@1.x`。版本选择请 [参考](/changelog)
|
||||
- `issues-hepler` 参数
|
||||
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
|
||||
- `token`:需拥有 push 权限的人员 token
|
||||
|
@@ -38,7 +38,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
## 💖 Who is using?
|
||||
|
||||
<embed src="../README.md#L997-L1044"></embed>
|
||||
<embed src="../README.md#L29-L82"></embed>
|
||||
|
||||
## ⚡ Feedback
|
||||
|
||||
|
@@ -38,7 +38,7 @@ jobs:
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v1.8
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
## 💖 谁在使用?
|
||||
|
||||
<embed src="../README.md#L997-L1044"></embed>
|
||||
<embed src="../README.md#L29-L82"></embed>
|
||||
|
||||
## ⚡ 反馈
|
||||
|
||||
|
13
package.json
13
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "issue-helper",
|
||||
"version": "1.7.0",
|
||||
"name": "issues-helper",
|
||||
"version": "1.11.0",
|
||||
"private": true,
|
||||
"description": "Some operations on issue.",
|
||||
"main": "src/main.js",
|
||||
@@ -11,15 +11,15 @@
|
||||
"docs:deploy": "gh-pages -d docs-dist",
|
||||
"deploy": "npm run docs:build && npm run docs:deploy",
|
||||
"package": "ncc build src/main.js -o dist",
|
||||
"up-users": "node ./script/update-users.js",
|
||||
"users": "node ./script/update-users.js",
|
||||
"main": "node ./src/main.js",
|
||||
"up-version": "node ./script/update-version.js"
|
||||
"ver": "node ./script/update-version.js"
|
||||
},
|
||||
"author": "xrkffgg",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/actions-cool/issue-helper.git",
|
||||
"url": "https://github.com/actions-cool/issues-helper.git",
|
||||
"branch": "main"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -32,7 +32,8 @@
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/github": "^4.0.0",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"dayjs": "^1.9.7"
|
||||
"dayjs": "^1.9.7",
|
||||
"lodash": "^4.17.20"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "^0.25.1",
|
||||
|
@@ -28,23 +28,23 @@ for (let j = 1; j <= row; j++) {
|
||||
table = `<table>
|
||||
${table}
|
||||
</table>
|
||||
|
||||
`;
|
||||
|
||||
// **************************************************************************
|
||||
|
||||
const point = '<table>';
|
||||
const last = `
|
||||
## LICENSE
|
||||
|
||||
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||
`;
|
||||
const cnPoint= `## 列 表`;
|
||||
const enPoint = `## List`;
|
||||
|
||||
// **************************************************************************
|
||||
|
||||
const cn = readFileSync('./README.md', 'utf8');
|
||||
const cnIn = cn.indexOf(point);
|
||||
const cnAfterIn = cn.indexOf(cnPoint);
|
||||
const cnBefore = cn.substring(0, cnIn);
|
||||
const newcn = cnBefore + table + last;
|
||||
const cnAfter = cn.substring(cnAfterIn, cn.length);
|
||||
const newcn = cnBefore + table + cnAfter;
|
||||
writeFileSync('./README.md', newcn);
|
||||
console.log(`🎉 Done cn`);
|
||||
|
||||
@@ -52,8 +52,10 @@ console.log(`🎉 Done cn`);
|
||||
|
||||
const en = readFileSync('./README.en-US.md', 'utf8');
|
||||
const enIn = en.indexOf(point);
|
||||
const enAfterIn = en.indexOf(enPoint);
|
||||
const enBefore = en.substring(0, enIn);
|
||||
const newen = enBefore + table + last;
|
||||
const enAfter = en.substring(enAfterIn, en.length);
|
||||
const newen = enBefore + table + enAfter;
|
||||
writeFileSync('./README.en-US.md', newen);
|
||||
console.log(`🎉 Done en`);
|
||||
|
||||
@@ -64,8 +66,7 @@ function getImg (o) {
|
||||
return `
|
||||
<a href="${o.url}">
|
||||
<img src="${o.logo}" width="46" />
|
||||
<br />
|
||||
${getName(o)}
|
||||
<div>${getName(o)}</div>
|
||||
</a>`
|
||||
}
|
||||
return ``
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { readFileSync, writeFileSync } = require('fs');
|
||||
|
||||
const last = /v1\.7/g;
|
||||
const now = 'v1.8';
|
||||
const last = /v1\.10/g;
|
||||
const now = 'v1.11';
|
||||
|
||||
let readme = readFileSync('./README.md', 'utf-8');
|
||||
readme = readme.replace(last, now);
|
||||
|
@@ -17,7 +17,7 @@ const {
|
||||
} = require('./public.js');
|
||||
|
||||
const {
|
||||
dealInput,
|
||||
dealStringToArr,
|
||||
matchKeyword,
|
||||
getPreMonth
|
||||
} = require('./util.js');
|
||||
@@ -83,7 +83,7 @@ async function doCheckIssue (owner, repo, issueNumber) {
|
||||
});
|
||||
|
||||
if (!!checkResult && assigneeIncludes) {
|
||||
let assigneesCheck = dealInput(assigneeIncludes);
|
||||
let assigneesCheck = dealStringToArr(assigneeIncludes);
|
||||
let checkAssignee = false;
|
||||
issue.data.assignees.forEach(it => {
|
||||
if (checkResult && !checkAssignee && assigneesCheck.includes(it.login)) {
|
||||
@@ -96,8 +96,8 @@ async function doCheckIssue (owner, repo, issueNumber) {
|
||||
|
||||
if (!!checkResult && titleIncludes) {
|
||||
const titleArr = titleIncludes.split('/');
|
||||
const keyword1 = dealInput(titleArr[0]);
|
||||
const keyword2 = dealInput(titleArr[1]);
|
||||
const keyword1 = dealStringToArr(titleArr[0]);
|
||||
const keyword2 = dealStringToArr(titleArr[1]);
|
||||
checkResult =
|
||||
keyword2.length ?
|
||||
matchKeyword(issue.data.title, keyword1) && matchKeyword(issue.data.title, keyword2) :
|
||||
@@ -106,8 +106,8 @@ async function doCheckIssue (owner, repo, issueNumber) {
|
||||
|
||||
if (!!checkResult && bodyIncludes) {
|
||||
const bodyArr = bodyIncludes.split('/');
|
||||
const keyword1 = dealInput(bodyArr[0]);
|
||||
const keyword2 = dealInput(bodyArr[1]);
|
||||
const keyword1 = dealStringToArr(bodyArr[0]);
|
||||
const keyword2 = dealStringToArr(bodyArr[1]);
|
||||
checkResult =
|
||||
keyword2.length ?
|
||||
matchKeyword(issue.data.body, keyword1) && matchKeyword(issue.data.body, keyword2) :
|
||||
|
162
src/base.js
162
src/base.js
@@ -20,7 +20,8 @@ const {
|
||||
} = require('./public.js');
|
||||
|
||||
const {
|
||||
dealInput,
|
||||
dealStringToArr,
|
||||
dealRandomAssignees,
|
||||
testDuplicate,
|
||||
} = require('./util.js');
|
||||
|
||||
@@ -31,15 +32,18 @@ const context = github.context;
|
||||
|
||||
const contents = core.getInput("contents");
|
||||
|
||||
const randomTo = core.getInput("random-to");
|
||||
|
||||
// **************************************************************************
|
||||
async function doAddAssignees (owner, repo, issueNumber, assignees) {
|
||||
const arr = dealRandomAssignees(assignees, randomTo);
|
||||
await octokit.issues.addAssignees({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
assignees: dealInput(assignees)
|
||||
assignees: arr
|
||||
});
|
||||
core.info(`Actions: [add-assignees][${assignees}] success!`);
|
||||
core.info(`Actions: [add-assignees][${arr}] success!`);
|
||||
};
|
||||
|
||||
async function doAddLabels (owner, repo, issueNumber, labels) {
|
||||
@@ -47,7 +51,7 @@ async function doAddLabels (owner, repo, issueNumber, labels) {
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
labels: dealInput(labels)
|
||||
labels: dealStringToArr(labels)
|
||||
});
|
||||
core.info(`Actions: [add-labels][${labels}] success!`);
|
||||
};
|
||||
@@ -73,7 +77,7 @@ async function doCreateComment (owner, repo, issueNumber, body) {
|
||||
core.setOutput("comment-id", data.id);
|
||||
|
||||
if (contents) {
|
||||
await doCreateCommentContent(owner, repo, data.id, dealInput(contents));
|
||||
await doCreateCommentContent(owner, repo, data.id, dealStringToArr(contents));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -99,8 +103,8 @@ async function doCreateIssue (owner, repo, title, body, labels, assignees) {
|
||||
repo,
|
||||
title,
|
||||
body,
|
||||
labels: dealInput(labels),
|
||||
assignees: dealInput(assignees),
|
||||
labels: dealStringToArr(labels),
|
||||
assignees: dealRandomAssignees(assignees, randomTo),
|
||||
};
|
||||
|
||||
const { data } = await octokit.issues.create(params);
|
||||
@@ -108,7 +112,7 @@ async function doCreateIssue (owner, repo, title, body, labels, assignees) {
|
||||
core.setOutput("issue-number", data.number);
|
||||
|
||||
if (contents) {
|
||||
await doCreateIssueContent(owner, repo, data.number, dealInput(contents));
|
||||
await doCreateIssueContent(owner, repo, data.number, dealStringToArr(contents));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -151,43 +155,55 @@ async function doMarkDuplicate (owner, repo, labels) {
|
||||
core.info(`This actions only support on 'issue_comment'!`);
|
||||
return false;
|
||||
}
|
||||
if (context.payload.action != 'created') {
|
||||
core.info(`This actions only support on 'issue_comment' created!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
const duplicateCommand = core.getInput("duplicate-command");
|
||||
const duplicateLabels = core.getInput("duplicate-labels");
|
||||
const removeLables = core.getInput("remove-labels");
|
||||
const closeIssue = core.getInput("close-issue");
|
||||
|
||||
const commentId = context.payload.comment.id;
|
||||
const commentBody = context.payload.comment.body;
|
||||
const issueNumber = context.payload.issue.number;
|
||||
if (context.payload.action == 'created' || context.payload.action == 'edited') {
|
||||
const duplicateCommand = core.getInput("duplicate-command");
|
||||
const duplicateLabels = core.getInput("duplicate-labels");
|
||||
const removeLables = core.getInput("remove-labels");
|
||||
const closeIssue = core.getInput("close-issue");
|
||||
|
||||
const ifCommandInput = !!duplicateCommand;
|
||||
const commentId = context.payload.comment.id;
|
||||
const commentBody = context.payload.comment.body;
|
||||
const issueNumber = context.payload.issue.number;
|
||||
|
||||
if ((ifCommandInput && commentBody.startsWith(duplicateCommand) && commentBody.split(' ')[0] == duplicateCommand) || testDuplicate(commentBody)) {
|
||||
if (ifCommandInput) {
|
||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
||||
} else if (contents) {
|
||||
await doCreateCommentContent(owner, repo, commentId, dealInput(contents));
|
||||
}
|
||||
if (duplicateLabels) {
|
||||
await doAddLabels(owner, repo, issueNumber, duplicateLabels);
|
||||
}
|
||||
if (removeLables) {
|
||||
await doRemoveLabels(owner, repo, issueNumber, removeLables);
|
||||
}
|
||||
if (labels) {
|
||||
await doSetLabels(owner, repo, issueNumber, labels);
|
||||
}
|
||||
if (closeIssue == 'true') {
|
||||
await doCloseIssue(owner, repo, issueNumber);
|
||||
const ifCommandInput = !!duplicateCommand;
|
||||
|
||||
if (!commentBody.includes('?') && ((ifCommandInput && commentBody.startsWith(duplicateCommand) && commentBody.split(' ')[0] == duplicateCommand) || testDuplicate(commentBody))) {
|
||||
if (ifCommandInput) {
|
||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
||||
} else if (contents) {
|
||||
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
||||
}
|
||||
|
||||
const issue = await octokit.issues.get({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber
|
||||
});
|
||||
let newLabels = [];
|
||||
if (issue.data.labels.length > 0) {
|
||||
newLabels = issue.data.labels.map(({ name }) => name).filter(name => !dealStringToArr(removeLables).includes(name));
|
||||
}
|
||||
if (duplicateLabels) {
|
||||
newLabels = [...newLabels, ...dealStringToArr(duplicateLabels)];
|
||||
}
|
||||
if (labels) {
|
||||
newLabels = dealStringToArr(labels);
|
||||
}
|
||||
if (newLabels.length > 0) {
|
||||
await doSetLabels(owner, repo, issueNumber, newLabels.toString());
|
||||
core.info(`Actions: [mark-duplicate-labels][${newLabels}] success!`);
|
||||
}
|
||||
|
||||
if (closeIssue == 'true') {
|
||||
await doCloseIssue(owner, repo, issueNumber);
|
||||
}
|
||||
} else {
|
||||
core.info(`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`);
|
||||
}
|
||||
} else {
|
||||
core.info(`This comment body should start whith 'duplicate-command'`);
|
||||
core.info(`This actions only support on 'issue_comment' created or edited!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -206,41 +222,55 @@ async function doRemoveAssignees (owner, repo, issueNumber, assignees) {
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
assignees: dealInput(assignees),
|
||||
assignees: dealStringToArr(assignees)
|
||||
});
|
||||
core.info(`Actions: [remove-assignees][${assignees}] success!`);
|
||||
};
|
||||
|
||||
async function doRemoveLabels (owner, repo, issueNumber, labels) {
|
||||
const issue = await octokit.issues.get({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber
|
||||
});
|
||||
const dealLabels = dealInput(labels);
|
||||
let addLables = [];
|
||||
if (dealLabels.length) {
|
||||
issue.data.labels.forEach(item => {
|
||||
!dealLabels.includes(item.name) ? addLables.push(item.name) : '';
|
||||
})
|
||||
await octokit.issues.setLabels({
|
||||
const dealLabels = dealStringToArr(labels);
|
||||
for (label of dealLabels) {
|
||||
await octokit.issues.removeLabel({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
labels: addLables
|
||||
name: label,
|
||||
});
|
||||
core.info(`Actions: [remove-labels][${labels}] success!`);
|
||||
core.info(`Actions: [remove-labels-foreach][${label}] success!`);
|
||||
}
|
||||
core.info(`Actions: [remove-labels][${labels}] success!`);
|
||||
};
|
||||
|
||||
async function doSetLabels (owner, repo, issueNumber, labels) {
|
||||
await octokit.issues.setLabels({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
labels: dealInput(labels)
|
||||
});
|
||||
core.info(`Actions: [set-labels][${labels}] success!`);
|
||||
// 概率性出现问题:https://github.com/octokit/rest.js/issues/1982,规避 setLabels
|
||||
if (labels) {
|
||||
// await octokit.issues.setLabels({
|
||||
// owner,
|
||||
// repo,
|
||||
// issue_number: issueNumber,
|
||||
// labels: dealStringToArr(labels)
|
||||
// });
|
||||
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));
|
||||
const addLabels = dealStringToArr(labels).filter(name => !baseLabels.includes(name));
|
||||
|
||||
if (removeLabels.length > 0) {
|
||||
await doRemoveLabels(owner, repo, issueNumber, removeLabels.toString());
|
||||
core.info(`Actions: [set-labels-remove][${removeLabels}] success!`);
|
||||
}
|
||||
|
||||
if (addLabels.length > 0) {
|
||||
await doAddLabels(owner, repo, issueNumber, addLabels.toString());
|
||||
core.info(`Actions: [set-labels-add][${addLabels}] success!`);
|
||||
}
|
||||
|
||||
core.info(`Actions: [set-labels][${labels}] success!`);
|
||||
}
|
||||
};
|
||||
|
||||
async function doUnlockIssue (owner, repo, issueNumber) {
|
||||
@@ -285,7 +315,7 @@ async function doUpdateComment (
|
||||
}
|
||||
|
||||
if (contents) {
|
||||
await doCreateCommentContent(owner, repo, commentId, dealInput(contents));
|
||||
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -343,8 +373,8 @@ async function doUpdateIssue (
|
||||
}
|
||||
params.body = next_body;
|
||||
|
||||
params.labels = labels ? dealInput(labels) : issue_labels;
|
||||
params.assignees = assignees ? dealInput(assignees) : issue_assignees;
|
||||
params.labels = labels ? dealStringToArr(labels) : issue_labels;
|
||||
params.assignees = assignees ? dealStringToArr(assignees) : issue_assignees;
|
||||
|
||||
await octokit.issues.update(params);
|
||||
core.info(`Actions: [update-issue][${issueNumber}] success!`);
|
||||
@@ -381,7 +411,7 @@ async function doWelcome (owner, repo, assignees, labels, body) {
|
||||
}
|
||||
|
||||
if (issueContents) {
|
||||
await doCreateIssueContent(owner, repo, issueNumber, dealInput(issueContents));
|
||||
await doCreateIssueContent(owner, repo, issueNumber, dealStringToArr(issueContents));
|
||||
}
|
||||
} else {
|
||||
core.info(`Actions: [welcome][${auth}] is not first time!`);
|
||||
|
@@ -22,7 +22,6 @@
|
||||
margin-right: 0 !important;
|
||||
background: linear-gradient(45deg,#72a2de 30%,#5db8c7 90%) !important;
|
||||
border: none !important;
|
||||
color: #000 !important;
|
||||
border-radius: 8px !important;
|
||||
text-align: center;
|
||||
|
||||
@@ -54,3 +53,60 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.__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-locale-select {
|
||||
background: linear-gradient(45deg,#72a2de 30%,#5db8c7 90%) !important;
|
||||
border-radius: 2px !important;
|
||||
border: none !important;
|
||||
a {
|
||||
color: #fff !important;
|
||||
letter-spacing: 0.6px;
|
||||
}
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: linear-gradient(
|
||||
225deg,
|
||||
white 45%,
|
||||
#aaa 50%,
|
||||
#ccc 56%,
|
||||
white 80%
|
||||
);
|
||||
box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.4);
|
||||
opacity: 1;
|
||||
transition-duration: 0.3s;
|
||||
transition-property: width, height;
|
||||
content: '';
|
||||
}
|
||||
&:hover::before {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.__dumi-default-menu + .__dumi-default-layout-content {
|
||||
tbody tr:hover {
|
||||
background: #fafafa;
|
||||
}
|
||||
}
|
||||
|
||||
.__dumi-default-alert {
|
||||
box-shadow: 0 6px 16px 2px rgba(0,0,0,.06) !important;
|
||||
border-radius: 2px !important;
|
||||
border: 1px solid #0000000f;
|
||||
}
|
||||
|
@@ -1,5 +1,9 @@
|
||||
.markdown table {
|
||||
width: auto !important;
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown table td:first-child {
|
||||
@@ -9,6 +13,7 @@
|
||||
code {
|
||||
padding: 1px 5px !important;
|
||||
border-radius: 4px;
|
||||
color: #ff7875 !important;
|
||||
background: rgba(0, 0, 0, 0.06) !important;
|
||||
box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
|
17
src/util.js
17
src/util.js
@@ -1,4 +1,6 @@
|
||||
function dealInput (para) {
|
||||
const sampleSize = require('lodash/sampleSize');
|
||||
|
||||
function dealStringToArr (para) {
|
||||
/**
|
||||
* in 'x1,x2,x3'
|
||||
* out ['x1','x2','x3']
|
||||
@@ -15,13 +17,21 @@ function dealInput (para) {
|
||||
return arr;
|
||||
};
|
||||
|
||||
function dealRandomAssignees (assignees, randomTo) {
|
||||
let arr = dealStringToArr(assignees);
|
||||
if (randomTo && Number(randomTo) > 0 && Number(randomTo) < arr.length) {
|
||||
arr = sampleSize(arr, randomTo);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
function matchKeyword (content, keywords) {
|
||||
return keywords.find(item => content.toLowerCase().includes(item));
|
||||
};
|
||||
|
||||
function testDuplicate(body) {
|
||||
if (!body || !body.startsWith('Duplicate of')) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
|
||||
let arr = body.split(' ');
|
||||
@@ -37,7 +47,8 @@ function getPreMonth (m) {
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
dealInput,
|
||||
dealStringToArr,
|
||||
dealRandomAssignees,
|
||||
getPreMonth,
|
||||
matchKeyword,
|
||||
testDuplicate,
|
||||
|
Reference in New Issue
Block a user