mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
Compare commits
60 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
23e8a42c18 | ||
![]() |
f83978e0ed | ||
![]() |
207593c17b | ||
![]() |
47079090b4 | ||
![]() |
33f5c9a41b | ||
![]() |
3f73e5f3b7 | ||
![]() |
dc4a7a3ca8 | ||
![]() |
f76bae5b37 | ||
![]() |
b395ad434f | ||
![]() |
b5d3740262 | ||
![]() |
c7e172c679 | ||
![]() |
7198ab8542 | ||
![]() |
eb91a70ccc | ||
![]() |
db8ab69114 | ||
![]() |
86102bcaef | ||
![]() |
c585c79a2a | ||
![]() |
b64d6e451f | ||
![]() |
d443509c47 | ||
![]() |
4b5824425d | ||
![]() |
b483519646 | ||
![]() |
4a12f7e54a | ||
![]() |
1b100be0d7 | ||
![]() |
afb2d0f2e5 | ||
![]() |
86d9dd7f1a | ||
![]() |
5891ef3922 | ||
![]() |
7a119339df | ||
![]() |
958f1760a2 | ||
![]() |
d82909b31d | ||
![]() |
89884a3a50 | ||
![]() |
1d2d39036b | ||
![]() |
a66760a95f | ||
![]() |
8abd4b29f8 | ||
![]() |
03203f3b5e | ||
![]() |
0acc9bec8c | ||
![]() |
56afcb6a23 | ||
![]() |
39ff3699d6 | ||
![]() |
efca7df548 | ||
![]() |
19c073d744 | ||
![]() |
a6a35924a4 | ||
![]() |
eb13c18a92 | ||
![]() |
d4e1fb07d0 | ||
![]() |
d2ccffe750 | ||
![]() |
f65aeadf97 | ||
![]() |
03f463ffc8 | ||
![]() |
728e5aa63e | ||
![]() |
2a7406da4f | ||
![]() |
f743eedacb | ||
![]() |
65461c17ed | ||
![]() |
1efbf3d3cf | ||
![]() |
14e4762bf5 | ||
![]() |
fd3eb6dbd3 | ||
![]() |
561193570f | ||
![]() |
f2288b2a14 | ||
![]() |
4281108d01 | ||
![]() |
1cc6f0b7ca | ||
![]() |
f6788d2b8e | ||
![]() |
8acd7991df | ||
![]() |
321da097ae | ||
![]() |
13e635fb2c | ||
![]() |
ae8b2ad0bd |
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -8,8 +8,8 @@ assignees:
|
|||||||
|
|
||||||
### 🐛 Bug 描述 Bug description
|
### 🐛 Bug 描述 Bug description
|
||||||
|
|
||||||
<!-- 请在上方详细地描述 bug,让大家都能理解。 -->
|
<!-- 请在上方详细地描述 bug,让大家都能理解。建议附上使用代码。 -->
|
||||||
<!-- Please describe the bug in detail above so that everyone can understand. -->
|
<!-- Please describe the bug in detail above so that everyone can understand. It is recommended to attach the use code. -->
|
||||||
|
|
||||||
### 🏞 期望结果 Desired result
|
### 🏞 期望结果 Desired result
|
||||||
|
|
||||||
|
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -42,13 +42,4 @@ Describe changes from the user side, and list all potential break changes or oth
|
|||||||
| 🇺🇸 English | |
|
| 🇺🇸 English | |
|
||||||
| 🇨🇳 Chinese | |
|
| 🇨🇳 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 -->
|
<!-- From: https://github.com/one-template/pr-template -->
|
||||||
|
22
.github/workflows/ci-notice.yml
vendored
Normal file
22
.github/workflows/ci-notice.yml
vendored
Normal 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'
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -15,8 +15,8 @@ jobs:
|
|||||||
- name: format
|
- name: format
|
||||||
run: yarn format-check
|
run: yarn format-check
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
run: yarn test
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
run: yarn package
|
run: yarn package
|
||||||
|
|
||||||
- name: package
|
|
||||||
run: yarn docs:build
|
|
||||||
|
19
.github/workflows/gh-pages.yml
vendored
Normal file
19
.github/workflows/gh-pages.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: GitHub Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run docs:build
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./docs-dist
|
40
.github/workflows/preview-build.yml
vendored
Normal file
40
.github/workflows/preview-build.yml
vendored
Normal 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
92
.github/workflows/preview-deploy.yml
vendored
Normal 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
19
.github/workflows/preview-start.yml
vendored
Normal 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 -->'
|
20
.github/workflows/surge-preview.yml
vendored
20
.github/workflows/surge-preview.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: 🔂 Surge PR Preview
|
|
||||||
|
|
||||||
on: pull_request_target
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
preview:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
|
||||||
- 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'
|
|
@@ -2,3 +2,4 @@ dist/
|
|||||||
lib/
|
lib/
|
||||||
docs-dist/
|
docs-dist/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
src/.umi/
|
||||||
|
@@ -4,7 +4,7 @@ import { defineConfig } from 'dumi';
|
|||||||
const name = 'issues-helper';
|
const name = 'issues-helper';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: 'Issue Helper',
|
title: 'Issues Helper',
|
||||||
mode: 'site',
|
mode: 'site',
|
||||||
favicon: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
|
favicon: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
|
||||||
logo: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
|
logo: 'https://avatars1.githubusercontent.com/u/73879334?s=200&v=4',
|
||||||
|
67
CHANGELOG.md
67
CHANGELOG.md
@@ -1,4 +1,69 @@
|
|||||||
## v2
|
<!--
|
||||||
|
🐞 Bug fix
|
||||||
|
🚀 New feature
|
||||||
|
💄 Perf
|
||||||
|
📝 Docs
|
||||||
|
⚡️ Code style
|
||||||
|
-->
|
||||||
|
|
||||||
|
## v2.4.1
|
||||||
|
|
||||||
|
`2021.09.05`
|
||||||
|
|
||||||
|
- fix: remove labels define error. [#86](https://github.com/actions-cool/issues-helper/pull/86)
|
||||||
|
|
||||||
|
## v2.4.0
|
||||||
|
|
||||||
|
`2021.08.15`
|
||||||
|
|
||||||
|
- 🚀 feat: support custom repo. [#83](https://github.com/actions-cool/issues-helper/pull/83)
|
||||||
|
- 🚀 feat: support default issueNumber get from context. [#81](https://github.com/actions-cool/issues-helper/pull/81)
|
||||||
|
- 🐞 fix: action run async. [#79](https://github.com/actions-cool/issues-helper/pull/79)
|
||||||
|
|
||||||
|
## v2.3.1
|
||||||
|
|
||||||
|
`2021.08.09`
|
||||||
|
|
||||||
|
- ⚡️ refactor: extract exclude-labels array to outer scope. [#75](https://github.com/actions-cool/issues-helper/pull/75) [@meteorlxy](https://github.com/meteorlxy)
|
||||||
|
|
||||||
|
## v2.3.0
|
||||||
|
|
||||||
|
`2021.08.09`
|
||||||
|
|
||||||
|
- 🚀 feat: add exclude-labels for `check-inactive` `close-issues` `lock-issues`. [#74](https://github.com/actions-cool/issues-helper/pull/74)
|
||||||
|
|
||||||
|
## v2.2.1
|
||||||
|
|
||||||
|
`2021.03.21`
|
||||||
|
|
||||||
|
- fix: list comment page lost in `find-comments`. [#66](https://github.com/actions-cool/issues-helper/pull/66)
|
||||||
|
|
||||||
|
## v2.2.0
|
||||||
|
|
||||||
|
`2021.03.21`
|
||||||
|
|
||||||
|
- feat: Added `title-excludes` parameter to `check-issue`. [#65](https://github.com/actions-cool/issues-helper/pull/65)
|
||||||
|
|
||||||
|
## v2.1.2
|
||||||
|
|
||||||
|
`2021.02.19`
|
||||||
|
|
||||||
|
- feat: update/delete comment support find-comments out. [#63](https://github.com/actions-cool/issues-helper/pull/63)
|
||||||
|
|
||||||
|
## v2.1.1
|
||||||
|
|
||||||
|
`2021.02.03`
|
||||||
|
|
||||||
|
- fix: api request limit. [#57](https://github.com/actions-cool/issues-helper/pull/57)
|
||||||
|
- chore: add catch. [#59](https://github.com/actions-cool/issues-helper/pull/59)
|
||||||
|
|
||||||
|
## v2.1.0
|
||||||
|
|
||||||
|
`2021.02.02`
|
||||||
|
|
||||||
|
- feat: add create-label. [#54](https://github.com/actions-cool/issues-helper/pull/54)
|
||||||
|
|
||||||
|
## v2.0.0
|
||||||
|
|
||||||
`2021.01.26`
|
`2021.01.26`
|
||||||
|
|
||||||
|
327
README.en-US.md
327
README.en-US.md
@@ -6,8 +6,8 @@
|
|||||||
[](https://github.com/marketplace/actions/issues-helper)
|
[](https://github.com/marketplace/actions/issues-helper)
|
||||||
[](https://github.com/umijs/dumi)
|
[](https://github.com/umijs/dumi)
|
||||||
[](https://github.com/prettier/prettier)
|
[](https://github.com/prettier/prettier)
|
||||||
[](https://github.com/actions-cool/issues-helper/releases)
|
|
||||||
|
|
||||||
|
[](https://github.com/actions-cool/issues-helper/releases)
|
||||||
[](https://github.com/actions-cool/issues-helper/stargazers)
|
[](https://github.com/actions-cool/issues-helper/stargazers)
|
||||||
[](https://github.com/actions-cool/issues-helper/discussions)
|
[](https://github.com/actions-cool/issues-helper/discussions)
|
||||||
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||||
@@ -32,65 +32,141 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/ant-design/ant-design">
|
<a href="https://github.com/ant-design/ant-design">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
|
||||||
<div>ant-design</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/ant-design-blazor/ant-design-blazor">
|
<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" />
|
<img src="https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png" width="46"/>
|
||||||
<div>ant-design-blazor</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/vueComponent/ant-design-vue">
|
<a href="https://github.com/vueComponent/ant-design-vue">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
|
||||||
<div>ant-design-vue</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/umijs/dumi">
|
<a href="https://github.com/umijs/dumi">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||||
<div>dumi</div>
|
</a>
|
||||||
</a></td>
|
</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>
|
</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"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/mui-org/material-ui">
|
<a href="https://github.com/mui-org/material-ui">
|
||||||
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46" />
|
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
|
||||||
<div>material-ui</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/ant-design/pro-components">
|
<a href="https://github.com/TuSimple/naive-ui">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
|
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
|
||||||
<div>pro-components</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
</tr>
|
||||||
<a href="https://github.com/react-component">
|
<tr>
|
||||||
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46" />
|
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
|
||||||
<div>react-component</div>
|
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
|
||||||
</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">
|
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
|
||||||
<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>
|
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/jdf2e/nutui">
|
||||||
|
<img src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/prettier/prettier">
|
||||||
|
<img src="https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/ant-design/pro-components">
|
||||||
|
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
|
||||||
|
</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"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/ant-design/pro-components">pro-components</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/lijinke666/react-music-player">
|
||||||
|
<img src="https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/umijs/umi">
|
<a href="https://github.com/umijs/umi">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||||
<div>umi</div>
|
</a>
|
||||||
</a></td>
|
</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">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/AttoJS/vue-request">
|
<a href="https://github.com/AttoJS/vue-request">
|
||||||
<img src="https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png" width="46" />
|
<img src="https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png" width="46"/>
|
||||||
<div>vue-request</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/AttoJS/vue-request">vue-request</a></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/vuepress/vuepress-next">
|
||||||
|
<img src="https://v2.vuepress.vuejs.org/images/hero.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/zoo-js/zoo">
|
<a href="https://github.com/zoo-js/zoo">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
|
||||||
<div>zoo</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
|
<td align="center" width="180"></td>
|
||||||
|
<td align="center" width="180"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/vuepress/vuepress-next">vuepress-next</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
|
||||||
|
<td align="center" width="180"></td>
|
||||||
<td align="center" width="180"></td>
|
<td align="center" width="180"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</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
|
## 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).
|
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).
|
||||||
@@ -101,6 +177,7 @@ When the following list does not have the features you want, you can submit it i
|
|||||||
- [`close-issue`](#close-issue)
|
- [`close-issue`](#close-issue)
|
||||||
- [`create-comment`](#create-comment)
|
- [`create-comment`](#create-comment)
|
||||||
- [`create-issue`](#create-issue)
|
- [`create-issue`](#create-issue)
|
||||||
|
- [`create-label`](#create-label)
|
||||||
- [`delete-comment`](#delete-comment)
|
- [`delete-comment`](#delete-comment)
|
||||||
- [`lock-issue`](#lock-issue)
|
- [`lock-issue`](#lock-issue)
|
||||||
- [`mark-duplicate`](#mark-duplicate)
|
- [`mark-duplicate`](#mark-duplicate)
|
||||||
@@ -144,7 +221,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -157,7 +234,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
||||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||||
|
|
||||||
@@ -186,7 +263,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -198,7 +275,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
||||||
|
|
||||||
- `labels` support multiple and separated by comma
|
- `labels` support multiple and separated by comma
|
||||||
@@ -211,19 +288,18 @@ Close the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
body: 'This is auto closed.'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -244,7 +320,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -260,7 +336,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| body | Add comment content | string | ✖ |
|
| body | Add comment content | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
||||||
|
|
||||||
@@ -288,7 +364,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -315,13 +391,41 @@ jobs:
|
|||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
|
#### `create-label`
|
||||||
|
|
||||||
|
Create label. If you want to maintain labels in batches, [see](https://github.com/actions-cool/labels-helper).
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Create label
|
||||||
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
|
with:
|
||||||
|
actions: 'create-label'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
label-name: 'xx'
|
||||||
|
label-color: '0095b3'
|
||||||
|
label-desc: 'xx'
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
|
| label-name | Label name, emoji support | string | ✔ |
|
||||||
|
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||||
|
| label-desc | Label description | string | ✖ |
|
||||||
|
|
||||||
|
- `label-name`: If it already exists, no operation
|
||||||
|
- `label-color`: Default is `ededed`
|
||||||
|
|
||||||
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
#### `delete-comment`
|
#### `delete-comment`
|
||||||
|
|
||||||
According to [`comment-id`](#comment-id) delete the specified comment.
|
According to [`comment-id`](#comment-id) delete the specified comment.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -333,6 +437,9 @@ According to [`comment-id`](#comment-id) delete the specified comment.
|
|||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
|
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||||
|
|
||||||
|
- When `out-comments` is entered, `comment-id` does not work
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -353,7 +460,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -364,7 +471,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| lock-reason | Reason for locking issue | string | ✖ |
|
| lock-reason | Reason for locking issue | string | ✖ |
|
||||||
|
|
||||||
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
||||||
@@ -387,7 +494,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -422,7 +529,7 @@ Open the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -433,7 +540,7 @@ Open the specified issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -443,7 +550,7 @@ Remove the person designated by issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -455,7 +562,7 @@ Remove the person designated by issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
@@ -466,7 +573,7 @@ Remove the specified labels.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -478,7 +585,7 @@ Remove the specified labels.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
||||||
|
|
||||||
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
|
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
|
||||||
@@ -491,7 +598,7 @@ Replace the labels of issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -503,7 +610,7 @@ Replace the labels of issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
@@ -514,7 +621,7 @@ Unlock the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -525,7 +632,7 @@ Unlock the specified issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -547,7 +654,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -560,12 +667,14 @@ jobs:
|
|||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
|
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||||
| body | Update the content of comment | string | ✖ |
|
| body | Update the content of comment | string | ✖ |
|
||||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||||
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
| contents | Add [reaction](#reactions-types) | string | ✖ |
|
||||||
|
|
||||||
- When `body` is not entered, it will remain as it is
|
- When `body` is not entered, it will remain as it is
|
||||||
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
||||||
|
- When `out-comments` is entered, `comment-id` does not work
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -575,7 +684,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -593,7 +702,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
||||||
| title | Modify the title of the issue | string | ✖ |
|
| title | Modify the title of the issue | string | ✖ |
|
||||||
| body | Modify the content of issue | string | ✖ |
|
| body | Modify the content of issue | string | ✖ |
|
||||||
@@ -625,7 +734,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -668,7 +777,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -690,6 +799,7 @@ jobs:
|
|||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
| inactive-label | The label name adding | string | ✖ |
|
| 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
|
- `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`
|
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
|
||||||
@@ -721,7 +831,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -734,9 +844,10 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignee-includes | Assignees contains check | string | ✖ |
|
| assignee-includes | Assignees contains check | string | ✖ |
|
||||||
| title-includes | Title 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 | ✖ |
|
| body-includes | Body contains check | string | ✖ |
|
||||||
|
|
||||||
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
||||||
@@ -760,7 +871,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -781,6 +892,7 @@ jobs:
|
|||||||
| body-includes | Body filtering | string | ✖ |
|
| body-includes | Body filtering | string | ✖ |
|
||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| 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
|
- `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
|
- `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
|
||||||
@@ -794,7 +906,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -807,7 +919,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✔ |
|
| token | [Token explain](#token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
||||||
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
||||||
| direction | Return `comments` sort | string | ✖ |
|
| direction | Return `comments` sort | string | ✖ |
|
||||||
@@ -842,7 +954,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -865,6 +977,7 @@ jobs:
|
|||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
| lock-reason | Reason for locking issue | string | ✖ |
|
| 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
|
- `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`
|
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
|
||||||
@@ -889,7 +1002,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -917,13 +1030,15 @@ Flexible reference.
|
|||||||
|
|
||||||
### `find-comments + create-comment + update-comment`
|
### `find-comments + create-comment + update-comment`
|
||||||
|
|
||||||
Hypothetical scenario: When the issue modification of the `watch` label is added, find out whether there is a comment containing `error` created by k, if there is only one, update the comment, if not, add a new comment.
|
Hypothetical scenario: When the issue modification of the `watch` label is added, find out whether there is a comment created by k that contains `<!-- Created by actions-cool/issues-helper -->`, if so, update the comment, If not, add a comment.
|
||||||
|
|
||||||
|
Of course, if you need such a scene, you can directly use [**Maintain One Comment**](https://github.com/actions-cool/maintain-one-comment).
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Test
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
isssue:
|
issues:
|
||||||
types: [edited]
|
types: [edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -932,32 +1047,40 @@ jobs:
|
|||||||
if: github.event.label.name == 'watch'
|
if: github.event.label.name == 'watch'
|
||||||
steps:
|
steps:
|
||||||
- name: find comments
|
- name: find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
id: fcid
|
id: fcid
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
comment-auth: k
|
comment-auth: k
|
||||||
body-includes: 'error'
|
body-includes: '<!-- Created by actions-cool/issues-helper -->'
|
||||||
|
|
||||||
|
# Output view found content. GitHub default outputs are strings
|
||||||
|
- run: echo find-comments ${{ steps.fcid.outputs.comments }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: create comment
|
- name: create comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
body: 'Some error!'
|
body: |
|
||||||
|
Error
|
||||||
|
<!-- Created by actions-cool/issues-helper -->
|
||||||
|
|
||||||
- name: update comment
|
- name: update comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: ${{ steps.fcid.outputs.comments[0].id }}
|
out-comments: ${{ steps.fcid.outputs.comments }}
|
||||||
body: 'Some error again!'
|
body: |
|
||||||
|
Error Again
|
||||||
|
<!-- Created by actions-cool/issues-helper -->
|
||||||
update-mode: 'append'
|
update-mode: 'append'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -976,7 +1099,14 @@ Need to have the person token with push permission.
|
|||||||
- `Name` is the same as in actions
|
- `Name` is the same as in actions
|
||||||
- `Value` fill in the token just applied by the individual
|
- `Value` fill in the token just applied by the individual
|
||||||
|
|
||||||
When the token is not filled in actions or the corresponding secrets are not added to the project, it will default to github-actions <kbd>bot</kbd>. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
|
When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
|
||||||
|
|
||||||
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
|
### GitHub Docs
|
||||||
|
|
||||||
|
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
||||||
|
- [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -984,7 +1114,7 @@ When the token is not filled in actions or the corresponding secrets are not add
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
id: createissue
|
id: createissue
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
@@ -993,12 +1123,10 @@ When the token is not filled in actions or the corresponding secrets are not add
|
|||||||
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
[More](https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs).
|
More:
|
||||||
|
|
||||||
### GitHub Docs
|
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||||
|
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
|
||||||
- [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -1059,6 +1187,7 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
|
|||||||
- v1 represents the initial version
|
- v1 represents the initial version
|
||||||
- The fixes and additions to the v1 version will be released to the v1.1 version
|
- The fixes and additions to the v1 version will be released to the v1.1 version
|
||||||
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2 version
|
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2 version
|
||||||
|
- After the v2 version, the version will be released strictly according to the three-level semantics, such as v2.0.0, v2.1.0
|
||||||
|
|
||||||
- Version selection
|
- 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)
|
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
|
||||||
@@ -1076,20 +1205,14 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
|
|||||||
uses: actions-cool/issues-helper@1.x
|
uses: actions-cool/issues-helper@1.x
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- v2 [upgrade reference](https://github.com/actions-cool/issues-helper/blob/fix/docs/guide/faq.en-US.md#what-should-i-pay-attention-to-when-upgrading-from-v1x-to-v2)
|
||||||
|
|
||||||
## Actions Template
|
## Actions Template
|
||||||
|
|
||||||
- You can directly use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repositorie 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
|
- 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)
|
- 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
|
## LICENSE
|
||||||
|
|
||||||
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||||
|
331
README.md
331
README.md
@@ -6,8 +6,8 @@
|
|||||||
[](https://github.com/marketplace/actions/issues-helper)
|
[](https://github.com/marketplace/actions/issues-helper)
|
||||||
[](https://github.com/umijs/dumi)
|
[](https://github.com/umijs/dumi)
|
||||||
[](https://github.com/prettier/prettier)
|
[](https://github.com/prettier/prettier)
|
||||||
[](https://github.com/actions-cool/issues-helper/releases)
|
|
||||||
|
|
||||||
|
[](https://github.com/actions-cool/issues-helper/releases)
|
||||||
[](https://github.com/actions-cool/issues-helper/stargazers)
|
[](https://github.com/actions-cool/issues-helper/stargazers)
|
||||||
[](https://github.com/actions-cool/issues-helper/discussions)
|
[](https://github.com/actions-cool/issues-helper/discussions)
|
||||||
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
[](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||||
@@ -32,65 +32,145 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/ant-design/ant-design">
|
<a href="https://github.com/ant-design/ant-design">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
|
||||||
<div>ant-design</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/ant-design-blazor/ant-design-blazor">
|
<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" />
|
<img src="https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png" width="46"/>
|
||||||
<div>ant-design-blazor</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/vueComponent/ant-design-vue">
|
<a href="https://github.com/vueComponent/ant-design-vue">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/32120805?s=200&v=4" width="46"/>
|
||||||
<div>ant-design-vue</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/umijs/dumi">
|
<a href="https://github.com/umijs/dumi">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||||
<div>dumi</div>
|
</a>
|
||||||
</a></td>
|
</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>
|
</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"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/mui-org/material-ui">
|
<a href="https://github.com/mui-org/material-ui">
|
||||||
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46" />
|
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
|
||||||
<div>material-ui</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/ant-design/pro-components">
|
<a href="https://github.com/TuSimple/naive-ui">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46" />
|
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
|
||||||
<div>pro-components</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
<td align="center" width="180">
|
</tr>
|
||||||
<a href="https://github.com/react-component">
|
<tr>
|
||||||
<img src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4" width="46" />
|
<td align="center" width="180"><a href="https://github.com/alibaba/formily">formily</a></td>
|
||||||
<div>react-component</div>
|
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
|
||||||
</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">
|
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
|
||||||
<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>
|
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/jdf2e/nutui">
|
||||||
|
<img src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/prettier/prettier">
|
||||||
|
<img src="https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/ant-design/pro-components">
|
||||||
|
<img src="https://avatars1.githubusercontent.com/u/12101536?s=200&v=4" width="46"/>
|
||||||
|
</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"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/ant-design/pro-components">pro-components</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/react-component">react-component</a></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/lijinke666/react-music-player">
|
||||||
|
<img src="https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/umijs/umi">
|
<a href="https://github.com/umijs/umi">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||||
<div>umi</div>
|
</a>
|
||||||
</a></td>
|
</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">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/AttoJS/vue-request">
|
<a href="https://github.com/AttoJS/vue-request">
|
||||||
<img src="https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png" width="46" />
|
<img src="https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png" width="46"/>
|
||||||
<div>vue-request</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/lijinke666/react-music-player">react-music-player</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/umijs/umi">umi</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/vitejs/vite">vite</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/AttoJS/vue-request">vue-request</a></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td align="center" width="180">
|
||||||
|
<a href="https://github.com/vuepress/vuepress-next">
|
||||||
|
<img src="https://v2.vuepress.vuejs.org/images/hero.png" width="46"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center" width="180">
|
<td align="center" width="180">
|
||||||
<a href="https://github.com/zoo-js/zoo">
|
<a href="https://github.com/zoo-js/zoo">
|
||||||
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46" />
|
<img src="https://avatars1.githubusercontent.com/u/70757173?s=200&v=4" width="46"/>
|
||||||
<div>zoo</div>
|
</a>
|
||||||
</a></td>
|
</td>
|
||||||
|
<td align="center" width="180"></td>
|
||||||
|
<td align="center" width="180"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/vuepress/vuepress-next">vuepress-next</a></td>
|
||||||
|
<td align="center" width="180"><a href="https://github.com/zoo-js/zoo">zoo</a></td>
|
||||||
|
<td align="center" width="180"></td>
|
||||||
<td align="center" width="180"></td>
|
<td align="center" width="180"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</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` 的代码
|
||||||
|
|
||||||
|
也欢迎加入 钉钉交流群
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 列 表
|
## 列 表
|
||||||
|
|
||||||
当以下列表没有你想要的功能时,可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
|
当以下列表没有你想要的功能时,可以在 [What do you want?](https://github.com/actions-cool/issues-helper/discussions/18) 中提出。
|
||||||
@@ -101,6 +181,7 @@
|
|||||||
- [`close-issue`](#close-issue)
|
- [`close-issue`](#close-issue)
|
||||||
- [`create-comment`](#create-comment)
|
- [`create-comment`](#create-comment)
|
||||||
- [`create-issue`](#create-issue)
|
- [`create-issue`](#create-issue)
|
||||||
|
- [`create-label`](#create-label)
|
||||||
- [`delete-comment`](#delete-comment)
|
- [`delete-comment`](#delete-comment)
|
||||||
- [`lock-issue`](#lock-issue)
|
- [`lock-issue`](#lock-issue)
|
||||||
- [`mark-duplicate`](#mark-duplicate)
|
- [`mark-duplicate`](#mark-duplicate)
|
||||||
@@ -144,7 +225,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -157,7 +238,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
|
|
||||||
@@ -186,7 +267,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -198,7 +279,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
||||||
|
|
||||||
- `labels` 支持多个,需用逗号隔开
|
- `labels` 支持多个,需用逗号隔开
|
||||||
@@ -211,19 +292,18 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
body: 'This is auto closed.'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -244,7 +324,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -260,7 +340,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| body | 新增评论的内容 | string | ✖ |
|
| body | 新增评论的内容 | string | ✖ |
|
||||||
| contents | 为新增评论的增加 [reaction](#reactions-types) | string | ✖ |
|
| contents | 为新增评论的增加 [reaction](#reactions-types) | string | ✖ |
|
||||||
|
|
||||||
@@ -288,7 +368,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -315,13 +395,41 @@ jobs:
|
|||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
|
#### `create-label`
|
||||||
|
|
||||||
|
新增 label。若想批量维护 labels,[可查看](https://github.com/actions-cool/labels-helper)。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Create label
|
||||||
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
|
with:
|
||||||
|
actions: 'create-label'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
label-name: 'xx'
|
||||||
|
label-color: '0095b3'
|
||||||
|
label-desc: 'xx'
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
|
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||||
|
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||||
|
| label-desc | 标签描述 | string | ✖ |
|
||||||
|
|
||||||
|
- `label-name`:若已存在,则无操作
|
||||||
|
- `label-color`:默认为 `ededed`
|
||||||
|
|
||||||
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
#### `delete-comment`
|
#### `delete-comment`
|
||||||
|
|
||||||
根据 [`comment-id`](#comment-id) 删除指定评论。
|
根据 [`comment-id`](#comment-id) 删除指定评论。
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -333,6 +441,9 @@ jobs:
|
|||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
|
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
||||||
|
|
||||||
|
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -353,7 +464,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -364,7 +475,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||||
|
|
||||||
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
||||||
@@ -387,7 +498,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -422,7 +533,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -433,7 +544,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -443,7 +554,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -455,7 +566,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
@@ -466,7 +577,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -478,7 +589,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
|
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
|
||||||
@@ -491,7 +602,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -503,7 +614,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
@@ -514,7 +625,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -525,7 +636,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -547,7 +658,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -560,12 +671,14 @@ jobs:
|
|||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
|
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
||||||
| body | 更新 comment 的内容 | string | ✖ |
|
| body | 更新 comment 的内容 | string | ✖ |
|
||||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||||
| contents | 增加 [reaction](#reactions-types) | string | ✖ |
|
| contents | 增加 [reaction](#reactions-types) | string | ✖ |
|
||||||
|
|
||||||
- `body` 不填时,会保持原有
|
- `body` 不填时,会保持原有
|
||||||
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
||||||
|
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -575,7 +688,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -593,7 +706,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
||||||
| title | 修改 issue 的标题 | string | ✖ |
|
| title | 修改 issue 的标题 | string | ✖ |
|
||||||
| body | 修改 issue 的内容 | string | ✖ |
|
| body | 修改 issue 的内容 | string | ✖ |
|
||||||
@@ -623,7 +736,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -666,7 +779,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -688,6 +801,7 @@ jobs:
|
|||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
| inactive-label | 新增标签名称 | string | ✖ |
|
| inactive-label | 新增标签名称 | string | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
|
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
|
||||||
@@ -715,7 +829,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -728,9 +842,10 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||||
| title-includes | 标题包含校验 | string | ✖ |
|
| title-includes | 标题包含校验 | string | ✖ |
|
||||||
|
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||||
| body-includes | 内容包含校验 | string | ✖ |
|
| body-includes | 内容包含校验 | string | ✖ |
|
||||||
|
|
||||||
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
||||||
@@ -754,7 +869,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -775,6 +890,7 @@ jobs:
|
|||||||
| body-includes | 包含内容筛选 | string | ✖ |
|
| body-includes | 包含内容筛选 | string | ✖ |
|
||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
@@ -788,7 +904,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -801,7 +917,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✔ |
|
| token | [token 说明](#token) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
||||||
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
||||||
| direction | 返回 `comments` 排序 | string | ✖ |
|
| direction | 返回 `comments` 排序 | string | ✖ |
|
||||||
@@ -836,7 +952,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -859,6 +975,7 @@ jobs:
|
|||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
|
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
|
||||||
@@ -883,7 +1000,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -911,13 +1028,15 @@ jobs:
|
|||||||
|
|
||||||
### `find-comments + create-comment + update-comment`
|
### `find-comments + create-comment + update-comment`
|
||||||
|
|
||||||
假设场景:当添加了 `watch` label 的 issue 修改时,查找是否有 k 创建的包含 `error` 的评论,如果只有一个,则更新该 comment,如果没有,则新增一个 comment。
|
假设场景:当添加了 `watch` label 的 issue 修改时,查找是否有 k 创建的包含 `<!-- Created by actions-cool/issues-helper -->` 的评论,如果有,则更新 comment,如果没有,则新增一个 comment。
|
||||||
|
|
||||||
|
当然,如果你需要这样的场景,可以直接使用 [**Maintain One Comment**](https://github.com/actions-cool/maintain-one-comment)。
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Test
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
isssue:
|
issues:
|
||||||
types: [edited]
|
types: [edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -926,32 +1045,40 @@ jobs:
|
|||||||
if: github.event.label.name == 'watch'
|
if: github.event.label.name == 'watch'
|
||||||
steps:
|
steps:
|
||||||
- name: find comments
|
- name: find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
id: fcid
|
id: fcid
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
comment-auth: k
|
comment-auth: k
|
||||||
body-includes: 'error'
|
body-includes: '<!-- Created by actions-cool/issues-helper -->'
|
||||||
|
|
||||||
|
# 输出查看找到的内容。GitHub 默认 outputs 为字符串
|
||||||
|
- run: echo find-comments ${{ steps.fcid.outputs.comments }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: create comment
|
- name: create comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 0 }}
|
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == false
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: ${{ github.event.issue.number }}
|
issue-number: ${{ github.event.issue.number }}
|
||||||
body: 'Some error!'
|
body: |
|
||||||
|
Error
|
||||||
|
<!-- Created by actions-cool/issues-helper -->
|
||||||
|
|
||||||
- name: update comment
|
- name: update comment
|
||||||
if: ${{ steps.fcid.outputs.comments.length == 1 }}
|
if: contains(steps.fcid.outputs.comments, '<!-- Created by actions-cool/issues-helper -->') == true
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
comment-id: ${{ steps.fcid.outputs.comments[0].id }}
|
out-comments: ${{ steps.fcid.outputs.comments }}
|
||||||
body: 'Some error again!'
|
body: |
|
||||||
|
Error Again
|
||||||
|
<!-- Created by actions-cool/issues-helper -->
|
||||||
update-mode: 'append'
|
update-mode: 'append'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -970,7 +1097,14 @@ jobs:
|
|||||||
- `Name` 与 actions 中保持一致
|
- `Name` 与 actions 中保持一致
|
||||||
- `Value` 填写刚才个人申请的 token
|
- `Value` 填写刚才个人申请的 token
|
||||||
|
|
||||||
当 actions 不填写 token 时,或项目未添加对应 secrets 时,会默认为 github-actions <kbd>bot</kbd>。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)。
|
当 actions 不填写 token 时,或填写 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)。
|
||||||
|
|
||||||
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
|
### GitHub Docs
|
||||||
|
|
||||||
|
- [GitHub Actions 语法](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
||||||
|
- [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -978,7 +1112,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
id: createissue
|
id: createissue
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
@@ -987,12 +1121,10 @@ jobs:
|
|||||||
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs)。
|
更多查看:
|
||||||
|
|
||||||
### GitHub Docs
|
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||||
|
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||||
- [GitHub Actions 语法](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
|
|
||||||
- [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -1054,6 +1186,7 @@ x2 + y2
|
|||||||
- v1 表示初始版本
|
- v1 表示初始版本
|
||||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
||||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
||||||
|
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
|
||||||
|
|
||||||
- 版本选择
|
- 版本选择
|
||||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
||||||
@@ -1071,20 +1204,14 @@ x2 + y2
|
|||||||
uses: actions-cool/issues-helper@1.x
|
uses: actions-cool/issues-helper@1.x
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- v2 [升级参考](https://github.com/actions-cool/issues-helper/blob/fix/docs/guide/faq.md#%E4%BB%8E-v1x-%E5%8D%87%E7%BA%A7%E5%88%B0-v2%E6%9C%89%E4%BB%80%E4%B9%88%E6%B3%A8%E6%84%8F%E7%9A%84%E5%9C%B0%E6%96%B9%E5%90%97)
|
||||||
|
|
||||||
## Actions 模板
|
## Actions 模板
|
||||||
|
|
||||||
- 可直接使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
- 可直接使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
||||||
- 个人练习和测试 [Actions](https://github.com/xrkffgg/test-ci) 的仓库
|
- 个人练习和测试 [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
|
## LICENSE
|
||||||
|
|
||||||
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
[MIT](https://github.com/actions-cool/issues-helper/blob/main/LICENSE)
|
||||||
|
42
USERS.js
42
USERS.js
@@ -1,5 +1,12 @@
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// Add to end
|
// Add to end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} url github地址
|
||||||
|
* @param {string} logo logo地址
|
||||||
|
* @param {string} width 自定义宽度,设置 auto 用于长型 logo
|
||||||
|
*/
|
||||||
|
|
||||||
const users = [
|
const users = [
|
||||||
{
|
{
|
||||||
url: 'https://github.com/ant-design/ant-design',
|
url: 'https://github.com/ant-design/ant-design',
|
||||||
@@ -19,7 +26,7 @@ const users = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: 'https://github.com/AttoJS/vue-request',
|
url: 'https://github.com/AttoJS/vue-request',
|
||||||
logo: 'https://raw.githubusercontent.com/AttoJS/art/master/vue-request-logo.png'
|
logo: 'https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: 'https://github.com/mui-org/material-ui',
|
url: 'https://github.com/mui-org/material-ui',
|
||||||
@@ -27,11 +34,11 @@ const users = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: 'https://github.com/lijinke666/react-music-player',
|
url: 'https://github.com/lijinke666/react-music-player',
|
||||||
logo: 'https://github.com/lijinke666/react-music-player/blob/master/assetsImg/logo.png?raw=true'
|
logo: 'https://user-images.githubusercontent.com/29775873/129506058-b0d8c741-f73a-496c-98de-7db2fb586db7.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: 'https://github.com/ant-design-blazor/ant-design-blazor',
|
url: 'https://github.com/ant-design-blazor/ant-design-blazor',
|
||||||
logo: 'https://raw.githubusercontent.com/ant-design-blazor/ant-design-blazor/7dbee63648e088c73c47eada79c897bc39fc3c26/logo.svg'
|
logo: 'https://user-images.githubusercontent.com/29775873/129505619-5abddb68-8663-4c71-b7d2-049c716aab26.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: 'https://github.com/zoo-js/zoo',
|
url: 'https://github.com/zoo-js/zoo',
|
||||||
@@ -45,6 +52,35 @@ const users = [
|
|||||||
url: 'https://github.com/ant-design/pro-components',
|
url: 'https://github.com/ant-design/pro-components',
|
||||||
logo: 'https://avatars1.githubusercontent.com/u/12101536?s=200&v=4'
|
logo: 'https://avatars1.githubusercontent.com/u/12101536?s=200&v=4'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
url: 'https://github.com/prettier/prettier',
|
||||||
|
logo: 'https://user-images.githubusercontent.com/29775873/129505900-ca248179-2435-429d-9fd3-779206bcd899.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: 'https://github.com/vuejs/jsx-next',
|
||||||
|
logo: 'https://avatars.githubusercontent.com/u/6128107?s=200&v=4',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: 'https://github.com/vitejs/vite',
|
||||||
|
logo: 'https://avatars.githubusercontent.com/u/65625612?s=200&v=4',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: 'https://github.com/jdf2e/nutui',
|
||||||
|
logo: 'https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 'auto',
|
||||||
|
url: 'https://github.com/alibaba/formily',
|
||||||
|
logo: 'https://img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: 'https://github.com/vuepress/vuepress-next',
|
||||||
|
logo: 'https://v2.vuepress.vuejs.org/images/hero.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: 'https://github.com/TuSimple/naive-ui',
|
||||||
|
logo: 'https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
26
action.yml
26
action.yml
@@ -1,15 +1,21 @@
|
|||||||
name: 'Issues Helper'
|
name: 'Issues Helper'
|
||||||
description: 'A GitHub Action that easily helps you automatically manage issues'
|
description: 'A GitHub Action that easily helps you automatically manage issues'
|
||||||
author: 'xrkffgg'
|
author: 'xrkffgg'
|
||||||
|
|
||||||
|
# https://actions-cool.github.io/github-action-branding/
|
||||||
branding:
|
branding:
|
||||||
icon: 'message-square'
|
icon: 'message-square'
|
||||||
color: 'black'
|
color: 'black'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
actions:
|
actions:
|
||||||
description: 'Action name'
|
description: 'Action name'
|
||||||
token:
|
token:
|
||||||
description: 'Github_token'
|
description: 'Github_token'
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
|
repo:
|
||||||
|
description: 'The repositorie'
|
||||||
|
|
||||||
issue-number:
|
issue-number:
|
||||||
description: 'Issue-number'
|
description: 'Issue-number'
|
||||||
comment-id:
|
comment-id:
|
||||||
@@ -22,8 +28,16 @@ inputs:
|
|||||||
description: 'Issue assignees'
|
description: 'Issue assignees'
|
||||||
random-to:
|
random-to:
|
||||||
description: 'Issue assignees random to'
|
description: 'Issue assignees random to'
|
||||||
|
# label
|
||||||
labels:
|
labels:
|
||||||
description: 'Issue labels'
|
description: 'Issue labels'
|
||||||
|
label-name:
|
||||||
|
description: 'Create label name'
|
||||||
|
label-color:
|
||||||
|
description: 'Create label color, default #ededed'
|
||||||
|
label-desc:
|
||||||
|
description: 'Create label description'
|
||||||
|
|
||||||
state:
|
state:
|
||||||
description: 'Issue state'
|
description: 'Issue state'
|
||||||
update-mode:
|
update-mode:
|
||||||
@@ -32,12 +46,19 @@ inputs:
|
|||||||
description: 'Issue reactions emoji'
|
description: 'Issue reactions emoji'
|
||||||
direction:
|
direction:
|
||||||
description: 'Find comments direction'
|
description: 'Find comments direction'
|
||||||
|
|
||||||
|
# comments
|
||||||
comment-auth:
|
comment-auth:
|
||||||
description: 'Find comments query auth'
|
description: 'Find comments query auth'
|
||||||
|
out-comments:
|
||||||
|
description: 'Find comments out comments'
|
||||||
assignee-includes:
|
assignee-includes:
|
||||||
description: 'Check use'
|
description: 'Check use'
|
||||||
body-includes:
|
body-includes:
|
||||||
description: 'Query use'
|
description: 'Query use'
|
||||||
|
# check
|
||||||
|
title-excludes:
|
||||||
|
description: 'Remove some to check title whether empty.'
|
||||||
title-includes:
|
title-includes:
|
||||||
description: 'Query use'
|
description: 'Query use'
|
||||||
issue-creator:
|
issue-creator:
|
||||||
@@ -56,6 +77,9 @@ inputs:
|
|||||||
description: 'The reason lock issue'
|
description: 'The reason lock issue'
|
||||||
inactive-label:
|
inactive-label:
|
||||||
description: 'Issue label set use'
|
description: 'Issue label set use'
|
||||||
|
exclude-labels:
|
||||||
|
description: 'Query issues exclude labels'
|
||||||
|
|
||||||
duplicate-command:
|
duplicate-command:
|
||||||
description: 'For mark-duplicate'
|
description: 'For mark-duplicate'
|
||||||
duplicate-labels:
|
duplicate-labels:
|
||||||
@@ -70,6 +94,7 @@ inputs:
|
|||||||
description: 'For month-statistics'
|
description: 'For month-statistics'
|
||||||
count-comments:
|
count-comments:
|
||||||
description: 'For month-statistics'
|
description: 'For month-statistics'
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
issue-number:
|
issue-number:
|
||||||
description: 'Create Issue Number'
|
description: 'Create Issue Number'
|
||||||
@@ -79,6 +104,7 @@ outputs:
|
|||||||
description: 'Find comments'
|
description: 'Find comments'
|
||||||
check-result:
|
check-result:
|
||||||
description: 'Check issue'
|
description: 'Check issue'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: node12
|
using: node12
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
3839
dist/index.js
vendored
3839
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -44,6 +44,7 @@ jobs:
|
|||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
| inactive-label | The label name adding | string | ✖ |
|
| 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
|
- `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`
|
- `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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -86,9 +87,10 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignee-includes | Assignees contains check | string | ✖ |
|
| assignee-includes | Assignees contains check | string | ✖ |
|
||||||
| title-includes | Title 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 | ✖ |
|
| body-includes | Body contains check | string | ✖ |
|
||||||
|
|
||||||
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
- `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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -131,6 +133,7 @@ jobs:
|
|||||||
| body-includes | Body filtering | string | ✖ |
|
| body-includes | Body filtering | string | ✖ |
|
||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| 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
|
- `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
|
- `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
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -155,7 +158,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
| comment-auth | Comment creator, all will be queried if not filled | string | ✖ |
|
||||||
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
| body-includes | Comment content includes filtering, no verification if not filled | string | ✖ |
|
||||||
| direction | Return `comments` sort | string | ✖ |
|
| direction | Return `comments` sort | string | ✖ |
|
||||||
@@ -188,7 +191,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -211,6 +214,7 @@ jobs:
|
|||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
| lock-reason | Reason for locking issue | string | ✖ |
|
| 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
|
- `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`
|
- `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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-inactive
|
- name: check-inactive
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-inactive'
|
actions: 'check-inactive'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -44,6 +44,7 @@ jobs:
|
|||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
| inactive-label | 新增标签名称 | string | ✖ |
|
| inactive-label | 新增标签名称 | string | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
||||||
@@ -69,7 +70,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check-issue
|
- name: check-issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'check-issue'
|
actions: 'check-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -82,9 +83,10 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||||
| title-includes | 标题包含校验 | string | ✖ |
|
| title-includes | 标题包含校验 | string | ✖ |
|
||||||
|
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||||
| body-includes | 内容包含校验 | string | ✖ |
|
| body-includes | 内容包含校验 | string | ✖ |
|
||||||
|
|
||||||
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
||||||
@@ -106,7 +108,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: close-issues
|
- name: close-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issues'
|
actions: 'close-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -127,6 +129,7 @@ jobs:
|
|||||||
| body-includes | 包含内容筛选 | string | ✖ |
|
| body-includes | 包含内容筛选 | string | ✖ |
|
||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
@@ -138,7 +141,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Find comments
|
- name: Find comments
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'find-comments'
|
actions: 'find-comments'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -151,7 +154,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
| comment-auth | 评论创建者,不填时会查询所有 | string | ✖ |
|
||||||
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
| body-includes | 评论内容包含过滤,不填时无校验 | string | ✖ |
|
||||||
| direction | 返回 `comments` 排序 | string | ✖ |
|
| direction | 返回 `comments` 排序 | string | ✖ |
|
||||||
@@ -184,7 +187,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: lock-issues
|
- name: lock-issues
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issues'
|
actions: 'lock-issues'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -207,6 +210,7 @@ jobs:
|
|||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||||
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
||||||
@@ -229,7 +233,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: month-statistics
|
- name: month-statistics
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'month-statistics'
|
actions: 'month-statistics'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
|
||||||
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
| labels | New labels. When it is not filled in or is empty character, do not add | string | ✖ |
|
||||||
|
|
||||||
- `labels` support multiple and separated by comma
|
- `labels` support multiple and separated by comma
|
||||||
@@ -85,19 +85,18 @@ Close the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
body: 'This is auto closed.'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| Param | Desc | Type | Required |
|
| Param | Desc | Type | Required |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
## `create-comment`
|
## `create-comment`
|
||||||
|
|
||||||
@@ -116,7 +115,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -132,7 +131,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| body | Add comment content | string | ✖ |
|
| body | Add comment content | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
||||||
|
|
||||||
@@ -158,7 +157,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -183,13 +182,39 @@ jobs:
|
|||||||
- `title` default is `Default Title`
|
- `title` default is `Default Title`
|
||||||
- Return `issue-number`. [Usage reference](/en-US/guide/ref#-outputs-use)
|
- Return `issue-number`. [Usage reference](/en-US/guide/ref#-outputs-use)
|
||||||
|
|
||||||
|
## `create-label`
|
||||||
|
|
||||||
|
Create label. If you want to maintain labels in batches, [see](https://github.com/actions-cool/labels-helper).
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Create label
|
||||||
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
|
with:
|
||||||
|
actions: 'create-label'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
label-name: 'xx'
|
||||||
|
label-color: '0095b3'
|
||||||
|
label-desc: 'xx'
|
||||||
|
```
|
||||||
|
|
||||||
|
| Param | Desc | Type | Required |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | Action type | string | ✔ |
|
||||||
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
|
| label-name | Label name, emoji support | string | ✔ |
|
||||||
|
| label-color | Label color, the format is hexadecimal color code, without `#` | string | ✖ |
|
||||||
|
| label-desc | Label description | string | ✖ |
|
||||||
|
|
||||||
|
- `label-name`: If it already exists, no operation
|
||||||
|
- `label-color`: Default is `ededed`
|
||||||
|
|
||||||
## `delete-comment`
|
## `delete-comment`
|
||||||
|
|
||||||
According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified comment.
|
According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified comment.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -201,6 +226,9 @@ According to [`comment-id`](/en-US/guide/ref#-comment-id) delete the specified c
|
|||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
|
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||||
|
|
||||||
|
- When `out-comments` is entered, `comment-id` does not work
|
||||||
|
|
||||||
## `lock-issue`
|
## `lock-issue`
|
||||||
|
|
||||||
@@ -219,7 +247,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -230,7 +258,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| lock-reason | Reason for locking issue | string | ✖ |
|
| lock-reason | Reason for locking issue | string | ✖ |
|
||||||
|
|
||||||
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
- `lock-reason`: Optional values are `off-topic` `too heated` `resolved` `spam`
|
||||||
@@ -251,7 +279,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -290,7 +318,7 @@ Open the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -301,7 +329,7 @@ Open the specified issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
## `remove-assignees`
|
## `remove-assignees`
|
||||||
|
|
||||||
@@ -309,7 +337,7 @@ Remove the person designated by issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -321,7 +349,7 @@ Remove the person designated by issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
| assignees | Designated person removed. When it is an empty character, do not remove | string | ✔ |
|
||||||
|
|
||||||
## `remove-labels`
|
## `remove-labels`
|
||||||
@@ -330,7 +358,7 @@ Remove the specified labels.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -342,7 +370,7 @@ Remove the specified labels.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
| labels | The removed labels. When it is a blank character, do not remove | string | ✔ |
|
||||||
|
|
||||||
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
|
- `labels` supports multiple, such as `x1,x2,x3`, only the labels added by the issue will be removed
|
||||||
@@ -353,7 +381,7 @@ Replace the labels of issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -365,7 +393,7 @@ Replace the labels of issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
| labels | labels set. When empty characters, will remove all | string | ✔ |
|
||||||
|
|
||||||
## `unlock-issue`
|
## `unlock-issue`
|
||||||
@@ -374,7 +402,7 @@ Unlock the specified issue.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -385,7 +413,7 @@ Unlock the specified issue.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
|
||||||
## `update-comment`
|
## `update-comment`
|
||||||
|
|
||||||
@@ -405,7 +433,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -418,12 +446,14 @@ jobs:
|
|||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| comment-id | The comment ID | number | ✔ |
|
| comment-id | The comment ID | number | ✔ |
|
||||||
|
| out-comments | The output of `find-comments`, if you find multiple, operate multiple | string | ✖ |
|
||||||
| body | Update the content of comment | string | ✖ |
|
| body | Update the content of comment | string | ✖ |
|
||||||
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
| update-mode | Update mode. Default `replace`, another `append` | string | ✖ |
|
||||||
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) | string | ✖ |
|
||||||
|
|
||||||
- When `body` is not entered, it will remain as it is
|
- When `body` is not entered, it will remain as it is
|
||||||
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
- When `update-mode` is `append`, additional operations will be performed. Anything other than `append` will be replaced. Only effective for `body`
|
||||||
|
- When `out-comments` is entered, `comment-id` does not work
|
||||||
|
|
||||||
## `update-issue`
|
## `update-issue`
|
||||||
|
|
||||||
@@ -431,7 +461,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -449,7 +479,7 @@ Update the specified issue according to the `issue-number`.
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✔ |
|
||||||
| issue-number | The number of issue | number | ✔ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
| state | Modify the status of issue, optional value `open` `closed` | string | ✖ |
|
||||||
| title | Modify the title of the issue | string | ✖ |
|
| title | Modify the title of the issue | string | ✖ |
|
||||||
| body | Modify the content of issue | string | ✖ |
|
| body | Modify the content of issue | string | ✖ |
|
||||||
@@ -479,7 +509,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
86
docs/base.md
86
docs/base.md
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add assigness
|
- name: Add assigness
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-assignees'
|
actions: 'add-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
| assignees | 指定人。当不填或者为空字符时,不操作 | string | ✖ |
|
||||||
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
| random-to | 当设置时,会在 assignees 中随机选择 | number | ✖ |
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
if: contains(github.event.issue.body, 'xxx') == false
|
if: contains(github.event.issue.body, 'xxx') == false
|
||||||
steps:
|
steps:
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'add-labels'
|
actions: 'add-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
| labels | 新增的 labels。当不填或者为空字符时,不新增 | string | ✖ |
|
||||||
|
|
||||||
- `labels` 支持多个,需用逗号隔开
|
- `labels` 支持多个,需用逗号隔开
|
||||||
@@ -85,19 +85,18 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Close issue
|
- name: Close issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'close-issue'
|
actions: 'close-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-number: xxx
|
issue-number: xxx
|
||||||
body: 'This is auto closed.'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 描述 | 类型 | 必填 |
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
## `create-comment`
|
## `create-comment`
|
||||||
|
|
||||||
@@ -116,7 +115,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'xxx'
|
if: github.event.label.name == 'xxx'
|
||||||
steps:
|
steps:
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -132,7 +131,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| body | 新增评论的内容 | string | ✖ |
|
| body | 新增评论的内容 | string | ✖ |
|
||||||
| contents | 为新增评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| contents | 为新增评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
||||||
|
|
||||||
@@ -158,7 +157,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create issue
|
- name: Create issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-issue'
|
actions: 'create-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -183,13 +182,39 @@ jobs:
|
|||||||
- `title` 默认为:`Default Title`
|
- `title` 默认为:`Default Title`
|
||||||
- 返回 `issue-number`,[用法参考](/guide/ref#-outputs-使用)
|
- 返回 `issue-number`,[用法参考](/guide/ref#-outputs-使用)
|
||||||
|
|
||||||
|
## `create-label`
|
||||||
|
|
||||||
|
新增 label。若想批量维护 labels,[可查看](https://github.com/actions-cool/labels-helper)。
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- name: Create label
|
||||||
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
|
with:
|
||||||
|
actions: 'create-label'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
label-name: 'xx'
|
||||||
|
label-color: '0095b3'
|
||||||
|
label-desc: 'xx'
|
||||||
|
```
|
||||||
|
|
||||||
|
| 参数 | 描述 | 类型 | 必填 |
|
||||||
|
| -- | -- | -- | -- |
|
||||||
|
| actions | 操作类型 | string | ✔ |
|
||||||
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
|
| label-name | 标签名称,支持 emoji | string | ✔ |
|
||||||
|
| label-color | 标签颜色,格式为 16 进制色码,不加 `#` | string | ✖ |
|
||||||
|
| label-desc | 标签描述 | string | ✖ |
|
||||||
|
|
||||||
|
- `label-name`:若已存在,则无操作
|
||||||
|
- `label-color`:默认为 `ededed`
|
||||||
|
|
||||||
## `delete-comment`
|
## `delete-comment`
|
||||||
|
|
||||||
根据 [`comment-id`](/guide/ref#-comment-id) 删除指定评论。
|
根据 [`comment-id`](/guide/ref#-comment-id) 删除指定评论。
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Delete comment
|
- name: Delete comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'delete-comment'
|
actions: 'delete-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -201,6 +226,9 @@ jobs:
|
|||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
|
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
||||||
|
|
||||||
|
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
||||||
|
|
||||||
## `lock-issue`
|
## `lock-issue`
|
||||||
|
|
||||||
@@ -219,7 +247,7 @@ jobs:
|
|||||||
if: github.event.label.name == 'invalid'
|
if: github.event.label.name == 'invalid'
|
||||||
steps:
|
steps:
|
||||||
- name: Lock issue
|
- name: Lock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'lock-issue'
|
actions: 'lock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -230,7 +258,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
| lock-reason | 锁定 issue 的原因 | string | ✖ |
|
||||||
|
|
||||||
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
- `lock-reason`:可选值有 `off-topic` `too heated` `resolved` `spam`
|
||||||
@@ -251,7 +279,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: mark-duplicate
|
- name: mark-duplicate
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'mark-duplicate'
|
actions: 'mark-duplicate'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -290,7 +318,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Open issue
|
- name: Open issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'open-issue'
|
actions: 'open-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -301,7 +329,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
## `remove-assignees`
|
## `remove-assignees`
|
||||||
|
|
||||||
@@ -309,7 +337,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove assignees
|
- name: Remove assignees
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-assignees'
|
actions: 'remove-assignees'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -321,7 +349,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
| assignees | 移除的指定人。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
## `remove-labels`
|
## `remove-labels`
|
||||||
@@ -330,7 +358,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Remove labels
|
- name: Remove labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -342,7 +370,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
| labels | 移除的 labels。当为空字符时,不进行移除 | string | ✔ |
|
||||||
|
|
||||||
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
|
- `labels` 支持多个,如 `x1,x2,x3`,只会移除 issue 已添加的 labels
|
||||||
@@ -353,7 +381,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Set labels
|
- name: Set labels
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'set-labels'
|
actions: 'set-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -365,7 +393,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
| labels | labels 设置。当空字符时,会移除所有 | string | ✔ |
|
||||||
|
|
||||||
## `unlock-issue`
|
## `unlock-issue`
|
||||||
@@ -374,7 +402,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Unlock issue
|
- name: Unlock issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'unlock-issue'
|
actions: 'unlock-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -385,7 +413,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
|
||||||
## `update-comment`
|
## `update-comment`
|
||||||
|
|
||||||
@@ -405,7 +433,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update comment
|
- name: Update comment
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-comment'
|
actions: 'update-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -418,12 +446,14 @@ jobs:
|
|||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| comment-id | 指定的 comment | number | ✔ |
|
| comment-id | 指定的 comment | number | ✔ |
|
||||||
|
| out-comments | `find-comments` 的输出,若查找多个,则操作多个 | string | ✖ |
|
||||||
| body | 更新 comment 的内容 | string | ✖ |
|
| body | 更新 comment 的内容 | string | ✖ |
|
||||||
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
| update-mode | 更新模式。默认 `replace` 替换,`append` 附加 | string | ✖ |
|
||||||
| contents | 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
| contents | 增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
|
||||||
|
|
||||||
- `body` 不填时,会保持原有
|
- `body` 不填时,会保持原有
|
||||||
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
- `update-mode` 为 `append` 时,会进行附加操作。非 `append` 都会进行替换。仅对 `body` 生效
|
||||||
|
- 当 `out-comments` 输入时,`comment-id` 不起作用
|
||||||
|
|
||||||
## `update-issue`
|
## `update-issue`
|
||||||
|
|
||||||
@@ -431,7 +461,7 @@ jobs:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Update issue
|
- name: Update issue
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'update-issue'
|
actions: 'update-issue'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -449,7 +479,7 @@ jobs:
|
|||||||
| -- | -- | -- | -- |
|
| -- | -- | -- | -- |
|
||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✔ |
|
||||||
| issue-number | 指定的 issue | number | ✔ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
| state | 修改 issue 的状态,可选值 `open` `closed` | string | ✖ |
|
||||||
| title | 修改 issue 的标题 | string | ✖ |
|
| title | 修改 issue 的标题 | string | ✖ |
|
||||||
| body | 修改 issue 的内容 | string | ✖ |
|
| body | 修改 issue 的内容 | string | ✖ |
|
||||||
@@ -478,7 +508,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: welcome
|
- name: welcome
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'welcome'
|
actions: 'welcome'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -9,6 +9,7 @@ toc: menu
|
|||||||
- v1 represents the initial version
|
- v1 represents the initial version
|
||||||
- The fixes and additions to the v1 version will be released to the v1.1 version
|
- The fixes and additions to the v1 version will be released to the v1.1 version
|
||||||
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2 version
|
- When the released v1.x runs stable for a certain period of time or undergoes refactoring, release the advanced v2 version
|
||||||
|
- After the v2 version, the version will be released strictly according to the three-level semantics, such as v2.0.0, v2.1.0
|
||||||
|
|
||||||
- Version selection
|
- 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)
|
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
|
||||||
@@ -26,4 +27,6 @@ toc: menu
|
|||||||
uses: actions-cool/issues-helper@1.x
|
uses: actions-cool/issues-helper@1.x
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- v2 [upgrade reference](/en-US/guide/faq)
|
||||||
|
|
||||||
<embed src="../CHANGELOG.md"></embed>
|
<embed src="../CHANGELOG.md"></embed>
|
||||||
|
@@ -9,6 +9,7 @@ toc: menu
|
|||||||
- v1 表示初始版本
|
- v1 表示初始版本
|
||||||
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
- 对 v1 版本的修复和新增会发布到 v1.1 版本
|
||||||
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
- 当发布的 v1.x 运行一定时间稳定或进行重构时,发布进阶 v2 版本
|
||||||
|
- v2 版本后会严格按照三级语义来发布版本,如 v2.0.0、v2.1.0
|
||||||
|
|
||||||
- 版本选择
|
- 版本选择
|
||||||
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
|
||||||
@@ -26,4 +27,6 @@ toc: menu
|
|||||||
uses: actions-cool/issues-helper@1.x
|
uses: actions-cool/issues-helper@1.x
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- v2 [升级参考](/guide/faq)
|
||||||
|
|
||||||
<embed src="../CHANGELOG.md"></embed>
|
<embed src="../CHANGELOG.md"></embed>
|
||||||
|
@@ -6,12 +6,16 @@ toc: menu
|
|||||||
|
|
||||||
GitHub Actions is provided free of charge by GitHub. Among them, the `Private` project has a monthly limit of 2000 times, [see details](https://github.com/settings/billing). The `Public` project is unlimited.
|
GitHub Actions is provided free of charge by GitHub. Among them, the `Private` project has a monthly limit of 2000 times, [see details](https://github.com/settings/billing). The `Public` project is unlimited.
|
||||||
|
|
||||||
|
### Is there a rate limit?
|
||||||
|
|
||||||
|
Yes. The bottom layer of Action uses GitHub REST API. The general situation is 5000 times per hour. It is basically sufficient in principle, and it is also required to avoid invalid requests when defining Action. [Detailed view](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
|
||||||
|
|
||||||
## Are there any ready-made templates for reference?
|
## Are there any ready-made templates for reference?
|
||||||
|
|
||||||
Yes.
|
Yes.
|
||||||
|
|
||||||
1. You can use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repository template
|
1. You can use this [GitHub Actions workflow template](https://github.com/actions-cool/.github) repository template
|
||||||
2. Personal exercises and tests [Actions](https://github.com/xrkffgg/test-ci) repository
|
2. Personal exercises and tests [Actions](https://github.com/actions-cool/test-issues-helper) repository
|
||||||
3. You can also refer to the warehouse of [online users](/en-US#-who-is-using)
|
3. You can also refer to the warehouse of [online users](/en-US#-who-is-using)
|
||||||
|
|
||||||
## I want to pause Actions, is there an easy way?
|
## I want to pause Actions, is there an easy way?
|
||||||
@@ -24,7 +28,7 @@ You can view the detailed [changelog](/en-US/changelog). The latest releases ver
|
|||||||
|
|
||||||
## What should I pay attention to when upgrading from v1.x to v2?
|
## What should I pay attention to when upgrading from v1.x to v2?
|
||||||
|
|
||||||
There is only one difference between v1.x and v2. That is, `require-permission` in `mark-duplicate` has added the default value `write`.
|
There is only one difference between v1.12 and v2.0.0. That is, `require-permission` in `mark-duplicate` has added the default value `write`.
|
||||||
|
|
||||||
## What should I do if there is no function I want here?
|
## What should I do if there is no function I want here?
|
||||||
|
|
||||||
|
@@ -6,12 +6,16 @@ toc: menu
|
|||||||
|
|
||||||
GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有 2000 次的限制,[具体查看](https://github.com/settings/billing)。`Public` 项目无限制。
|
GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有 2000 次的限制,[具体查看](https://github.com/settings/billing)。`Public` 项目无限制。
|
||||||
|
|
||||||
|
### 有没有速率的限制?
|
||||||
|
|
||||||
|
有的。Action 底层使用的是 GitHub REST API。一般情况是每小时 5000 次。原则上基本是够用的,同时也要求在 Action 定义时,尽量避免无效的请求。[具体查看](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting)。
|
||||||
|
|
||||||
## 有没有现成的模板可以参考?
|
## 有没有现成的模板可以参考?
|
||||||
|
|
||||||
有的。
|
有的。
|
||||||
|
|
||||||
1. 你可以使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
1. 你可以使用这个 [GitHub Actions workflow template](https://github.com/actions-cool/.github) 仓库的模板
|
||||||
2. 个人练习和测试 [Actions](https://github.com/xrkffgg/test-ci) 的仓库
|
2. 个人练习和测试 [Actions](https://github.com/actions-cool/test-issues-helper) 的仓库
|
||||||
3. 也可以来 [线上使用者](/#-谁在使用?) 的仓库参照
|
3. 也可以来 [线上使用者](/#-谁在使用?) 的仓库参照
|
||||||
|
|
||||||
## 我想暂停 Actions,有没有简单的办法?
|
## 我想暂停 Actions,有没有简单的办法?
|
||||||
@@ -24,7 +28,7 @@ GitHub Actions 是由 GitHub 免费提供的。其中 `Private` 项目每月有
|
|||||||
|
|
||||||
## 从 v1.x 升级到 v2,有什么注意的地方吗?
|
## 从 v1.x 升级到 v2,有什么注意的地方吗?
|
||||||
|
|
||||||
v1.x 和 v2 版本的差别只有一处。即 `mark-duplicate` 中的 `require-permission` 增加了默认值 `write`。
|
v1.12 和 v2.0.0 版本的差别只有一处。即 `mark-duplicate` 中的 `require-permission` 增加了默认值 `write`。
|
||||||
|
|
||||||
## 如果这里没有我想要的功能,该怎么办?
|
## 如果这里没有我想要的功能,该怎么办?
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ with:
|
|||||||
|
|
||||||
- `count-lables`: Regardless of setting `true` or `'ture'`, all received in the program is in string format
|
- `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
|
At the same time, the output is also in string format. [See](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs).
|
||||||
|
|
||||||
- `check-result`: The judgment condition is `if: steps.xxid.outputs.check-result =='true'`
|
- `check-result`: The judgment condition is `if: steps.xxid.outputs.check-result =='true'`
|
||||||
|
|
||||||
@@ -38,7 +38,13 @@ When an action is set, such as adding a label `x1` to an issue, Actions will aut
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
|
||||||
|
|
||||||
## `assignees` scope
|
## `assignees` scope
|
||||||
|
|
||||||
- The owner or collaborator of the warehouse, if there is an organization, including members
|
- The owner or collaborator of the warehouse, if there is an organization, including members
|
||||||
- Participants of the issue, including creators and commenters
|
- 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.
|
||||||
|
@@ -29,7 +29,7 @@ with:
|
|||||||
|
|
||||||
- `count-lables`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
|
- `count-lables`:不管设置 `true` 还是 `'ture'`,在程序里接收到的都是字符串格式
|
||||||
|
|
||||||
同时输出的也是字符串格式
|
同时输出的也是字符串格式。[参看](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs)。
|
||||||
|
|
||||||
- `check-result`:判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
|
- `check-result`:判断条件为 `if: steps.xxid.outputs.check-result == 'true'`
|
||||||
|
|
||||||
@@ -39,7 +39,13 @@ with:
|
|||||||
|
|
||||||
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
|
但如果这个是由 `GitHub Actions bot` 完成的(即 actions 中 token 不传,或使用默认 `token: ${{ secrets.GITHUB_TOKEN }}`),则不会触发 label `x2` 的 Actions。
|
||||||
|
|
||||||
|
ref: [GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
|
||||||
|
|
||||||
## `assignees` 范围
|
## `assignees` 范围
|
||||||
|
|
||||||
- 仓库的所有者或协作者,若有组织,包括成员
|
- 仓库的所有者或协作者,若有组织,包括成员
|
||||||
- issue 的参与者,包括创建者、评论者
|
- issue 的参与者,包括创建者、评论者
|
||||||
|
|
||||||
|
## 运行基准
|
||||||
|
|
||||||
|
比如:我用 Tag 触发一个 Action,触发基准的代码就会走这个 Tag 对应代码的 Action 定义,而非主分支代码。
|
||||||
|
@@ -13,7 +13,7 @@ Need to have the person token with push permission.
|
|||||||
- `Name` is the same as in actions
|
- `Name` is the same as in actions
|
||||||
- `Value` fill in the token just applied by the individual
|
- `Value` fill in the token just applied by the individual
|
||||||
|
|
||||||
When the token is not filled in actions or the corresponding secrets are not added to the project, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
|
When the token is not filled in actions or input `${{ secrets.GITHUB_TOKEN }}`, it will default to `github-actions-bot`. [More](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow).
|
||||||
|
|
||||||
## 📍 GitHub Docs
|
## 📍 GitHub Docs
|
||||||
|
|
||||||
@@ -33,7 +33,10 @@ When the token is not filled in actions or the corresponding secrets are not add
|
|||||||
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
[More](https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs).
|
More:
|
||||||
|
|
||||||
|
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||||
|
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||||
|
|
||||||
## 📍 `includes` check rules
|
## 📍 `includes` check rules
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ toc: menu
|
|||||||
- `Name` 与 actions 中保持一致
|
- `Name` 与 actions 中保持一致
|
||||||
- `Value` 填写刚才个人申请的 token
|
- `Value` 填写刚才个人申请的 token
|
||||||
|
|
||||||
当 actions 不填写 token 时,或项目未添加对应 secrets 时,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)。
|
当 actions 不填写 token 时,或输入 `${{ secrets.GITHUB_TOKEN }}`,会默认为 `github-actions-bot`。[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow)。
|
||||||
|
|
||||||
## 📍 GitHub 相关文档
|
## 📍 GitHub 相关文档
|
||||||
|
|
||||||
@@ -33,7 +33,10 @@ toc: menu
|
|||||||
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
run: echo "Outputs issue_number is ${{ steps.createissue.outputs.issue-number }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
[更多查看](https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs)。
|
更多查看:
|
||||||
|
|
||||||
|
1. https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#outputs
|
||||||
|
2. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||||
|
|
||||||
## 📍 `includes` 校验规则
|
## 📍 `includes` 校验规则
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.0.0
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
- `on`: The action trigger condition
|
- `on`: The action trigger condition
|
||||||
- Reference [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
- Reference [Events that trigger workflows](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||||
- `uses`: Use actions name
|
- `uses`: Use actions name
|
||||||
- `uses: actions-cool/issues-helper@v2`。Please [refer](/en-US/changelog) to version selection
|
- `uses: actions-cool/issues-helper@v2.0.0`。Please [refer](/en-US/changelog) to version selection
|
||||||
- `issues-hepler` parameter
|
- `issues-hepler` parameter
|
||||||
- `actions`: The name of the function used, **required**. Support multiple, separated by commas, such as `create-comment,close-issue` means comment and close issue
|
- `actions`: The name of the function used, **required**. Support multiple, separated by commas, such as `create-comment,close-issue` means comment and close issue
|
||||||
- `token`: A person who needs to have push permission token
|
- `token`: A person who needs to have push permission token
|
||||||
|
@@ -33,7 +33,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.0.0
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
- `on`:action 触发条件
|
- `on`:action 触发条件
|
||||||
- 参考 [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
- 参考 [工作流触发机制](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows)
|
||||||
- `uses`:使用 actions 名称
|
- `uses`:使用 actions 名称
|
||||||
- `uses: actions-cool/issues-helper@v2`。版本选择请 [参考](/changelog)
|
- `uses: actions-cool/issues-helper@v2.0.0`。版本选择请 [参考](/changelog)
|
||||||
- `issues-hepler` 参数
|
- `issues-hepler` 参数
|
||||||
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
|
- `actions`:使用功能的名称,**必填**。支持多个,需用逗号隔开,如 `create-comment,close-issue` 表示评论和关闭 issue
|
||||||
- `token`:需拥有 push 权限的人员 token
|
- `token`:需拥有 push 权限的人员 token
|
||||||
|
@@ -38,7 +38,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@@ -38,7 +38,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: help wanted
|
- name: help wanted
|
||||||
if: github.event.label.name == 'help wanted'
|
if: github.event.label.name == 'help wanted'
|
||||||
uses: actions-cool/issues-helper@v2
|
uses: actions-cool/issues-helper@v2.4.1
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -60,3 +60,7 @@ jobs:
|
|||||||
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
|
- 通过 [Issue](https://github.com/actions-cool/issues-helper/issues) 报告 bug 或进行咨询
|
||||||
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
|
- 通过 [Discussions](https://github.com/actions-cool/issues-helper/discussions) 进行讨论
|
||||||
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码
|
- 提交 [Pull Request](https://github.com/actions-cool/issues-helper/pulls) 改进 `issues-helper` 的代码
|
||||||
|
|
||||||
|
也欢迎加入 钉钉交流群
|
||||||
|
|
||||||
|

|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
background-color: rgba(0, 0, 0, 0.04) !important;
|
background-color: rgba(0, 0, 0, 0.04) !important;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: inset 0 0 10px 2px rgba(0,0,0,.2);
|
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 {
|
.__dumi-default-menu {
|
||||||
@@ -54,11 +58,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.__dumi-default-layout-features + .__dumi-default-layout-content {
|
.__dumi-default-layout-hero {
|
||||||
td {
|
h1 {
|
||||||
transition: all 0.3s;
|
[data-prefers-color=dark] & {
|
||||||
&:hover {
|
color: #000 !important;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,6 +105,10 @@
|
|||||||
.__dumi-default-menu + .__dumi-default-layout-content {
|
.__dumi-default-menu + .__dumi-default-layout-content {
|
||||||
tbody tr:hover {
|
tbody tr:hover {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
|
|
||||||
|
[data-prefers-color=dark] & {
|
||||||
|
background: #2b2b2b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
15
package.json
15
package.json
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "issues-helper",
|
"name": "issues-helper",
|
||||||
"version": "2.0.0",
|
"version": "2.4.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Some operations on issue.",
|
"description": "A GitHub Action easily helps you automatically manage issues.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "dumi dev",
|
"start": "dumi dev",
|
||||||
@@ -12,10 +12,12 @@
|
|||||||
"deploy": "npm run docs:build && npm run docs:deploy",
|
"deploy": "npm run docs:build && npm run docs:deploy",
|
||||||
"format": "prettier --write **/*.ts **/*.js",
|
"format": "prettier --write **/*.ts **/*.js",
|
||||||
"format-check": "prettier --check **/*.ts **/*.js",
|
"format-check": "prettier --check **/*.ts **/*.js",
|
||||||
|
"test": "father test",
|
||||||
"package": "ncc build src/main.js -o dist",
|
"package": "ncc build src/main.js -o dist",
|
||||||
"users": "node ./script/update-users.js",
|
"users": "node ./script/update-users.js",
|
||||||
"main": "node ./src/main.js",
|
"main": "node ./src/main.js",
|
||||||
"ver": "node ./script/update-version.js"
|
"ver": "node ./script/update-version.js",
|
||||||
|
"pub": "npm run package && npm run ver"
|
||||||
},
|
},
|
||||||
"author": "xrkffgg",
|
"author": "xrkffgg",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -35,15 +37,14 @@
|
|||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
"@octokit/rest": "^18.0.12",
|
"@octokit/rest": "^18.0.12",
|
||||||
"dayjs": "^1.9.7",
|
"dayjs": "^1.9.7",
|
||||||
|
"father": "^2.30.7",
|
||||||
"lodash": "^4.17.20"
|
"lodash": "^4.17.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@umijs/fabric": "^2.5.6",
|
"@umijs/fabric": "^2.5.6",
|
||||||
"@vercel/ncc": "^0.25.1",
|
"@vercel/ncc": "^0.25.1",
|
||||||
"common-tags": "^1.8.0",
|
"common-tags": "^1.8.0",
|
||||||
"dotenv": "^8.2.0",
|
"dumi": "^1.1.26",
|
||||||
"dumi": "^1.1.1",
|
"gh-pages": "^3.1.0"
|
||||||
"gh-pages": "^3.1.0",
|
|
||||||
"react": "^17.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,10 +5,12 @@ const { stripIndent } = require('common-tags');
|
|||||||
|
|
||||||
let { users } = require('../USERS.js');
|
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 table = '';
|
||||||
let row = users.length / 4;
|
let row = users.length / 4;
|
||||||
let lastNo = 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 + 1])}</td>
|
||||||
<td align="center" width="180">${getImg(users[(j - 1) * 4 + 2])}</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>
|
<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;
|
table += data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,8 +43,8 @@ ${table}
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
const point = '<table>';
|
const point = '<table>';
|
||||||
const cnPoint = `## 列 表`;
|
const cnPoint = `## ⚡ 反馈`;
|
||||||
const enPoint = `## List`;
|
const enPoint = `## ⚡ Feedback`;
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
@@ -65,14 +74,34 @@ function getImg(o) {
|
|||||||
if (o) {
|
if (o) {
|
||||||
return `
|
return `
|
||||||
<a href="${o.url}">
|
<a href="${o.url}">
|
||||||
<img src="${o.logo}" width="46" />
|
<img src="${o.logo}"${getImgWidth(o)}/>
|
||||||
<div>${getName(o)}</div>
|
</a>
|
||||||
</a>`;
|
`;
|
||||||
}
|
}
|
||||||
return ``;
|
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) {
|
function getName(o) {
|
||||||
|
if (o) {
|
||||||
|
return `<a href="${o.url}">${o.url.split('/').slice(-1)[0]}</a>`;
|
||||||
|
}
|
||||||
|
return ``;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCurrentName(o) {
|
||||||
if (o) {
|
if (o) {
|
||||||
return o.url.split('/').slice(-1)[0];
|
return o.url.split('/').slice(-1)[0];
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
const { readFileSync, writeFileSync } = require('fs');
|
const { readFileSync, writeFileSync } = require('fs');
|
||||||
|
|
||||||
const last = /v1\.11/g;
|
const { version } = JSON.parse(readFileSync('./package.json', 'utf-8'));
|
||||||
const now = 'v2';
|
|
||||||
|
const last = /v2\.4\.0/g;
|
||||||
|
const now = `v${version}`;
|
||||||
|
|
||||||
let readme = readFileSync('./README.md', 'utf-8');
|
let readme = readFileSync('./README.md', 'utf-8');
|
||||||
readme = readme.replace(last, now);
|
readme = readme.replace(last, now);
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
require('dotenv').config();
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
|
|
||||||
@@ -28,6 +27,7 @@ direction = direction === 'desc' ? 'desc' : 'asc';
|
|||||||
const commentAuth = core.getInput('comment-auth');
|
const commentAuth = core.getInput('comment-auth');
|
||||||
const bodyIncludes = core.getInput('body-includes');
|
const bodyIncludes = core.getInput('body-includes');
|
||||||
const titleIncludes = core.getInput('title-includes');
|
const titleIncludes = core.getInput('title-includes');
|
||||||
|
const titleRemove = core.getInput('title-excludes');
|
||||||
const assigneeIncludes = core.getInput('assignee-includes');
|
const assigneeIncludes = core.getInput('assignee-includes');
|
||||||
|
|
||||||
let issueState = core.getInput('issue-state') || 'open';
|
let issueState = core.getInput('issue-state') || 'open';
|
||||||
@@ -67,7 +67,7 @@ async function doCheckInactive(owner, repo, labels) {
|
|||||||
* 关键字匹配,是否包含前一个某个+后一个某个 '官网,网站/挂了,无法访问'
|
* 关键字匹配,是否包含前一个某个+后一个某个 '官网,网站/挂了,无法访问'
|
||||||
*/
|
*/
|
||||||
async function doCheckIssue(owner, repo, issueNumber) {
|
async function doCheckIssue(owner, repo, issueNumber) {
|
||||||
var checkResult = true;
|
let checkResult = true;
|
||||||
const issue = await octokit.issues.get({
|
const issue = await octokit.issues.get({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
@@ -86,6 +86,17 @@ async function doCheckIssue(owner, repo, issueNumber) {
|
|||||||
!checkAssignee ? (checkResult = false) : null;
|
!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) {
|
if (!!checkResult && titleIncludes) {
|
||||||
const titleArr = titleIncludes.split('/');
|
const titleArr = titleIncludes.split('/');
|
||||||
const keyword1 = dealStringToArr(titleArr[0]);
|
const keyword1 = dealStringToArr(titleArr[0]);
|
||||||
@@ -123,14 +134,10 @@ async function doCloseIssues(owner, repo, labels) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function doFindComments(owner, repo, issueNumber) {
|
async function doFindComments(owner, repo, issueNumber) {
|
||||||
const res = await octokit.issues.listComments({
|
const commentList = await listComments(owner, repo, issueNumber);
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issueNumber,
|
|
||||||
});
|
|
||||||
core.info(`Actions: [find-comments][${issueNumber}] success!`);
|
core.info(`Actions: [find-comments][${issueNumber}] success!`);
|
||||||
let comments = [];
|
let comments = [];
|
||||||
res.data.forEach(item => {
|
commentList.forEach(item => {
|
||||||
const a = commentAuth ? item.user.login === commentAuth : true;
|
const a = commentAuth ? item.user.login === commentAuth : true;
|
||||||
const b = bodyIncludes ? item.body.includes(bodyIncludes) : true;
|
const b = bodyIncludes ? item.body.includes(bodyIncludes) : true;
|
||||||
if (a && b) {
|
if (a && b) {
|
||||||
@@ -147,6 +154,21 @@ async function doFindComments(owner, repo, issueNumber) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
core.setOutput('comments', comments);
|
core.setOutput('comments', comments);
|
||||||
|
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) {
|
async function doLockIssues(owner, repo, labels) {
|
||||||
@@ -208,9 +230,7 @@ async function doMonthStatistics(owner, repo, labels, assignees) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let now = dayjs()
|
let now = dayjs().utc().format('YYYY-MM-DD HH:mm:ss');
|
||||||
.utc()
|
|
||||||
.format('YYYY-MM-DD HH:mm:ss');
|
|
||||||
let body = `
|
let body = `
|
||||||
- Created time: ${now}
|
- Created time: ${now}
|
||||||
|
|
||||||
|
@@ -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
4
src/app.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
// For dumi style
|
||||||
|
import '../less/main.less';
|
||||||
|
import '../less/markdown.less';
|
||||||
|
import '../less/dumi.less';
|
202
src/base.js
202
src/base.js
@@ -1,4 +1,3 @@
|
|||||||
require('dotenv').config();
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const github = require('@actions/github');
|
const github = require('@actions/github');
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
@@ -122,13 +121,52 @@ async function doCreateIssueContent(owner, repo, issueNumber, contents) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function doCreateLabel(owner, repo) {
|
||||||
|
const name = core.getInput('label-name');
|
||||||
|
const color = core.getInput('label-color') || 'ededed';
|
||||||
|
const description = core.getInput('label-desc') || '';
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
core.setFailed(`This actions should input 'label-name'!`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await octokit.issues.createLabel({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
name,
|
||||||
|
color,
|
||||||
|
description,
|
||||||
|
});
|
||||||
|
core.info(`Actions: [create-label][${name}] success!`);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function doDeleteComment(owner, repo, commentId) {
|
async function doDeleteComment(owner, repo, commentId) {
|
||||||
await octokit.issues.deleteComment({
|
let id = commentId;
|
||||||
owner,
|
|
||||||
repo,
|
const outComments = core.getInput('out-comments');
|
||||||
comment_id: commentId,
|
if (outComments) {
|
||||||
});
|
const outCommentsArr = JSON.parse(outComments);
|
||||||
core.info(`Actions: [delete-comment][${commentId}] success!`);
|
core.info(`Actions: [out-comments-length][${outCommentsArr.length}] success!`);
|
||||||
|
outCommentsArr.forEach(async item => {
|
||||||
|
await doDelet(item.id);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await doDelet(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doDelet(id) {
|
||||||
|
await octokit.issues.deleteComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
comment_id: id,
|
||||||
|
});
|
||||||
|
core.info(`Actions: [delete-comment][${id}] success!`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function doLockIssue(owner, repo, issueNumber) {
|
async function doLockIssue(owner, repo, issueNumber) {
|
||||||
@@ -166,17 +204,6 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
|
|
||||||
const ifCommandInput = !!duplicateCommand;
|
const ifCommandInput = !!duplicateCommand;
|
||||||
|
|
||||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
username: commentUser,
|
|
||||||
});
|
|
||||||
const { permission } = res.data;
|
|
||||||
if (!checkPermission(requirePermission, permission)) {
|
|
||||||
core.info(`The user ${commentUser} is not allow!`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!commentBody.includes('?') &&
|
!commentBody.includes('?') &&
|
||||||
((ifCommandInput &&
|
((ifCommandInput &&
|
||||||
@@ -184,37 +211,52 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
commentBody.split(' ')[0] == duplicateCommand) ||
|
commentBody.split(' ')[0] == duplicateCommand) ||
|
||||||
testDuplicate(commentBody))
|
testDuplicate(commentBody))
|
||||||
) {
|
) {
|
||||||
if (ifCommandInput) {
|
try {
|
||||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
owner,
|
||||||
} else if (contents) {
|
repo,
|
||||||
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
username: commentUser,
|
||||||
}
|
});
|
||||||
|
const { permission } = res.data;
|
||||||
|
if (!checkPermission(requirePermission, permission)) {
|
||||||
|
core.info(`The user ${commentUser} is not allow!`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const issue = await octokit.issues.get({
|
if (ifCommandInput) {
|
||||||
owner,
|
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
||||||
repo,
|
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
||||||
issue_number: issueNumber,
|
} else if (contents) {
|
||||||
});
|
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
||||||
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') {
|
const issue = await octokit.issues.get({
|
||||||
await doCloseIssue(owner, repo, issueNumber);
|
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);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
core.info(error.message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
core.info(
|
core.info(
|
||||||
@@ -248,14 +290,14 @@ async function doRemoveAssignees(owner, repo, issueNumber, assignees) {
|
|||||||
|
|
||||||
async function doRemoveLabels(owner, repo, issueNumber, labels) {
|
async function doRemoveLabels(owner, repo, issueNumber, labels) {
|
||||||
const dealLabels = dealStringToArr(labels);
|
const dealLabels = dealStringToArr(labels);
|
||||||
for (label of dealLabels) {
|
for (const label of dealLabels) {
|
||||||
await octokit.issues.removeLabel({
|
await octokit.issues.removeLabel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
name: label,
|
name: label,
|
||||||
});
|
});
|
||||||
core.info(`Actions: [remove-labels-foreach][${label}] success!`);
|
core.info(`Actions: [remove-label][${label}] success!`);
|
||||||
}
|
}
|
||||||
core.info(`Actions: [remove-labels][${labels}] success!`);
|
core.info(`Actions: [remove-labels][${labels}] success!`);
|
||||||
}
|
}
|
||||||
@@ -302,32 +344,47 @@ async function doUnlockIssue(owner, repo, issueNumber) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function doUpdateComment(owner, repo, commentId, body, updateMode, ifUpdateBody) {
|
async function doUpdateComment(owner, repo, commentId, body, updateMode, ifUpdateBody) {
|
||||||
const comment = await octokit.issues.getComment({
|
let id = commentId;
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
comment_id: commentId,
|
|
||||||
});
|
|
||||||
const comment_body = comment.data.body;
|
|
||||||
|
|
||||||
let params = {
|
const outComments = core.getInput('out-comments');
|
||||||
owner,
|
if (outComments) {
|
||||||
repo,
|
const outCommentsArr = JSON.parse(outComments);
|
||||||
comment_id: commentId,
|
core.info(`Actions: [out-comments-length][${outCommentsArr.length}] success!`);
|
||||||
};
|
outCommentsArr.forEach(async item => {
|
||||||
|
await doComment(item.id);
|
||||||
if (core.getInput('body') || ifUpdateBody) {
|
});
|
||||||
if (updateMode === 'append') {
|
} else {
|
||||||
params.body = `${comment_body}\n${body}`;
|
await doComment(id);
|
||||||
} else {
|
|
||||||
params.body = body;
|
|
||||||
}
|
|
||||||
|
|
||||||
await octokit.issues.updateComment(params);
|
|
||||||
core.info(`Actions: [update-comment][${commentId}] success!`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contents) {
|
async function doComment(id) {
|
||||||
await doCreateCommentContent(owner, repo, commentId, dealStringToArr(contents));
|
const comment = await octokit.issues.getComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
comment_id: id,
|
||||||
|
});
|
||||||
|
const comment_body = comment.data.body;
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
comment_id: id,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (core.getInput('body') || ifUpdateBody) {
|
||||||
|
if (updateMode === 'append') {
|
||||||
|
params.body = `${comment_body}\n${body}`;
|
||||||
|
} else {
|
||||||
|
params.body = body;
|
||||||
|
}
|
||||||
|
|
||||||
|
await octokit.issues.updateComment(params);
|
||||||
|
core.info(`Actions: [update-comment][${id}] success!`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (contents) {
|
||||||
|
await doCreateCommentContent(owner, repo, id, dealStringToArr(contents));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,6 +507,7 @@ module.exports = {
|
|||||||
doCreateCommentContent,
|
doCreateCommentContent,
|
||||||
doCreateIssue,
|
doCreateIssue,
|
||||||
doCreateIssueContent,
|
doCreateIssueContent,
|
||||||
|
doCreateLabel,
|
||||||
doDeleteComment,
|
doDeleteComment,
|
||||||
doMarkDuplicate,
|
doMarkDuplicate,
|
||||||
doLockIssue,
|
doLockIssue,
|
||||||
|
35
src/main.js
35
src/main.js
@@ -8,6 +8,7 @@ const {
|
|||||||
doCloseIssue,
|
doCloseIssue,
|
||||||
doCreateComment,
|
doCreateComment,
|
||||||
doCreateIssue,
|
doCreateIssue,
|
||||||
|
doCreateLabel,
|
||||||
doDeleteComment,
|
doDeleteComment,
|
||||||
doMarkDuplicate,
|
doMarkDuplicate,
|
||||||
doLockIssue,
|
doLockIssue,
|
||||||
@@ -38,6 +39,7 @@ const ALLACTIONS = [
|
|||||||
'close-issue',
|
'close-issue',
|
||||||
'create-comment',
|
'create-comment',
|
||||||
'create-issue',
|
'create-issue',
|
||||||
|
'create-label',
|
||||||
'delete-comment',
|
'delete-comment',
|
||||||
'lock-issue',
|
'lock-issue',
|
||||||
'mark-duplicate',
|
'mark-duplicate',
|
||||||
@@ -62,10 +64,22 @@ const ALLACTIONS = [
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
async function main() {
|
async function main() {
|
||||||
try {
|
try {
|
||||||
const owner = github.context.repo.owner;
|
const ctx = github.context;
|
||||||
const repo = github.context.repo.repo;
|
|
||||||
|
|
||||||
const issueNumber = core.getInput('issue-number');
|
// No display to outside
|
||||||
|
let owner, repo;
|
||||||
|
if (core.getInput('repo')) {
|
||||||
|
owner = core.getInput('repo').split('/')[0];
|
||||||
|
repo = core.getInput('repo').split('/')[1];
|
||||||
|
} else {
|
||||||
|
owner = ctx.repo.owner;
|
||||||
|
repo = ctx.repo.repo;
|
||||||
|
}
|
||||||
|
|
||||||
|
let defaultNo;
|
||||||
|
if (ctx.eventName === 'issues') defaultNo = ctx.payload.issue.number;
|
||||||
|
|
||||||
|
const issueNumber = core.getInput('issue-number') || defaultNo;
|
||||||
const commentId = core.getInput('comment-id');
|
const commentId = core.getInput('comment-id');
|
||||||
|
|
||||||
const defaultBody = `Currently at ${owner}/${repo}. And this is default comment.`;
|
const defaultBody = `Currently at ${owner}/${repo}. And this is default comment.`;
|
||||||
@@ -88,15 +102,15 @@ async function main() {
|
|||||||
const actions = core.getInput('actions', { required: true });
|
const actions = core.getInput('actions', { required: true });
|
||||||
|
|
||||||
const actionsArr = actions.split(',');
|
const actionsArr = actions.split(',');
|
||||||
actionsArr.forEach(item => {
|
for (const action of actionsArr) {
|
||||||
testActions(item.trim());
|
await testActions(action.trim());
|
||||||
});
|
}
|
||||||
|
|
||||||
function testActions(action) {
|
async function testActions(action) {
|
||||||
if (ALLACTIONS.includes(action)) {
|
if (ALLACTIONS.includes(action)) {
|
||||||
choseActions(action);
|
await choseActions(action);
|
||||||
} else {
|
} else {
|
||||||
core.setFailed('This actions not supported!');
|
core.setFailed(`Actions: [${action}] is not supported!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +132,9 @@ async function main() {
|
|||||||
case 'create-issue':
|
case 'create-issue':
|
||||||
await doCreateIssue(owner, repo, title, body, labels, assignees);
|
await doCreateIssue(owner, repo, title, body, labels, assignees);
|
||||||
break;
|
break;
|
||||||
|
case 'create-label':
|
||||||
|
await doCreateLabel(owner, repo);
|
||||||
|
break;
|
||||||
case 'delete-comment':
|
case 'delete-comment':
|
||||||
await doDeleteComment(owner, repo, commentId);
|
await doDeleteComment(owner, repo, commentId);
|
||||||
break;
|
break;
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
require('dotenv').config();
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
|
|
||||||
const { getPreMonth } = require('./util.js');
|
const { getPreMonth, dealStringToArr } = require('./util.js');
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
var dayjs = require('dayjs');
|
var dayjs = require('dayjs');
|
||||||
@@ -24,9 +23,20 @@ const issueMentioned = core.getInput('issue-mentioned');
|
|||||||
const bodyIncludes = core.getInput('body-includes');
|
const bodyIncludes = core.getInput('body-includes');
|
||||||
const titleIncludes = core.getInput('title-includes');
|
const titleIncludes = core.getInput('title-includes');
|
||||||
|
|
||||||
|
const excludeLabels = core.getInput('exclude-labels');
|
||||||
|
|
||||||
const inactiveDay = core.getInput('inactive-day');
|
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) {
|
async function doQueryIssues(owner, repo, labels, state, creator) {
|
||||||
let params = {
|
let params = {
|
||||||
owner,
|
owner,
|
||||||
@@ -50,6 +60,7 @@ async function doQueryIssues(owner, repo, labels, state, creator) {
|
|||||||
let issues = [];
|
let issues = [];
|
||||||
let issueNumbers = [];
|
let issueNumbers = [];
|
||||||
if (res.length) {
|
if (res.length) {
|
||||||
|
const excludeLabelsArr = dealStringToArr(excludeLabels);
|
||||||
res.forEach(iss => {
|
res.forEach(iss => {
|
||||||
const a = bodyIncludes ? iss.body.includes(bodyIncludes) : true;
|
const a = bodyIncludes ? iss.body.includes(bodyIncludes) : true;
|
||||||
const b = titleIncludes ? iss.title.includes(titleIncludes) : true;
|
const b = titleIncludes ? iss.title.includes(titleIncludes) : true;
|
||||||
@@ -59,6 +70,12 @@ async function doQueryIssues(owner, repo, labels, state, creator) {
|
|||||||
* You can identify pull requests by the pull_request key.
|
* You can identify pull requests by the pull_request key.
|
||||||
*/
|
*/
|
||||||
if (a && b && iss.pull_request === undefined) {
|
if (a && b && iss.pull_request === undefined) {
|
||||||
|
if (excludeLabelsArr.length) {
|
||||||
|
for (let i = 0; i < iss.labels.length; i += 1) {
|
||||||
|
if (excludeLabelsArr.includes(iss.labels[i].name)) return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (inactiveDay) {
|
if (inactiveDay) {
|
||||||
let lastTime = dayjs.utc().subtract(Number(inactiveDay), 'day');
|
let lastTime = dayjs.utc().subtract(Number(inactiveDay), 'day');
|
||||||
let updateTime = dayjs.utc(iss.updated_at);
|
let updateTime = dayjs.utc(iss.updated_at);
|
||||||
@@ -110,11 +127,7 @@ async function getIssuesInMonth(owner, repo, thisMonth, page = 1) {
|
|||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
function getCreatedMonth(d) {
|
function getCreatedMonth(d) {
|
||||||
return (
|
return dayjs(d).utc().month() + 1;
|
||||||
dayjs(d)
|
|
||||||
.utc()
|
|
||||||
.month() + 1
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
45
tests/public.test.js
Normal file
45
tests/public.test.js
Normal 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);
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user