mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
77e16f7f08 | ||
![]() |
26a4993608 | ||
![]() |
f3eb0a0a96 | ||
![]() |
a610082f8a | ||
![]() |
556cc4f66e | ||
![]() |
e0e6d4a469 | ||
![]() |
fac636e8a9 | ||
![]() |
a0d1612783 | ||
![]() |
49a9184d18 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
node-version: [20.x]
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@main
|
||||
|
4
.github/workflows/preview-build.yml
vendored
4
.github/workflows/preview-build.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
zip -r dist.zip docs-dist
|
||||
|
||||
- name: upload dist artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist.zip
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
- name: Upload PR number
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pr
|
||||
path: ./pr-id.txt
|
||||
|
6
.github/workflows/preview-deploy.yml
vendored
6
.github/workflows/preview-deploy.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
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
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
name: pr
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
run: echo "::set-output name=id::$(<pr-id.txt)"
|
||||
|
||||
- name: download dist artifact
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
workflow_conclusion: success
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
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
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
name: pr
|
||||
|
@@ -7,6 +7,13 @@
|
||||
🛠 refactor
|
||||
-->
|
||||
|
||||
## v3.6.0
|
||||
|
||||
`2024.02.18`
|
||||
|
||||
- 🚀 feat: add assignees to find-issues. [#192](https://github.com/actions-cool/issues-helper/pull/192)
|
||||
- 💄 chore: Bump runtime to node20. [#190](https://github.com/actions-cool/issues-helper/pull/190) [@danielcompton](https://github.com/danielcompton)
|
||||
|
||||
## v3.5.2
|
||||
|
||||
`2023.08.16`
|
||||
|
@@ -79,7 +79,7 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/umijs/dumi">
|
||||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png" width="46"/>
|
||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
@@ -116,7 +116,7 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/TuSimple/naive-ui">
|
||||
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
|
||||
<img src="https://www.naiveui.com/assets/naivelogo-XQ1U1Js8.svg" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -975,11 +975,12 @@ Find the current repository, the creator is k , the title contains `this` , the
|
||||
|
||||
```js
|
||||
[
|
||||
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', created: '', updated: ''},
|
||||
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', created: '', updated: ''},
|
||||
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', assignees: ['x1', 'x2'], created: '', updated: ''},
|
||||
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', assignees: ['x1', 'x2'], created: '', updated: ''},
|
||||
]
|
||||
```
|
||||
|
||||
- `issue-state`: The default is `open`. Other values are: `closed`, `all`
|
||||
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
|
||||
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
|
||||
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
|
||||
|
@@ -79,7 +79,7 @@
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/umijs/dumi">
|
||||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png" width="46"/>
|
||||
<img src="https://avatars1.githubusercontent.com/u/33895495?s=200&v=4" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
@@ -116,7 +116,7 @@
|
||||
</td>
|
||||
<td align="center" width="180">
|
||||
<a href="https://github.com/TuSimple/naive-ui">
|
||||
<img src="https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667" width="46"/>
|
||||
<img src="https://www.naiveui.com/assets/naivelogo-XQ1U1Js8.svg" width="46"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -977,8 +977,8 @@ jobs:
|
||||
|
||||
```js
|
||||
[
|
||||
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', created: '', updated: ''},
|
||||
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', created: '', updated: ''},
|
||||
{number: 1, auth: 'x', body: 'xxx', body: 'xxx', state: 'open', assignees: ['x1', 'x2'], created: '', updated: ''},
|
||||
{number: 2, auth: 'x', body: 'xxx', body: 'xxx', state: 'closed', assignees: ['x1', 'x2'], created: '', updated: ''},
|
||||
]
|
||||
```
|
||||
|
||||
|
2
USERS.js
2
USERS.js
@@ -77,7 +77,7 @@ const users = [
|
||||
},
|
||||
{
|
||||
url: 'https://github.com/TuSimple/naive-ui',
|
||||
logo: 'https://camo.githubusercontent.com/b8ebecade711b9ae1fa306e7a1c9dd680fb56b0e2b9f015fec9cbad343570353/68747470733a2f2f6e6169766575692e6f73732d636e2d686f6e676b6f6e672e616c6979756e63732e636f6d2f6e616976656c6f676f2e737667',
|
||||
logo: 'https://www.naiveui.com/assets/naivelogo-XQ1U1Js8.svg',
|
||||
},
|
||||
{
|
||||
url: 'https://github.com/element-plus/element-plus',
|
||||
|
@@ -119,5 +119,5 @@ outputs:
|
||||
description: 'Check issue'
|
||||
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: 'dist/index.js'
|
||||
|
1
dist/index.js
vendored
1
dist/index.js
vendored
@@ -16599,6 +16599,7 @@ function doFindIssues() {
|
||||
title: issue.title,
|
||||
body: issue.body,
|
||||
state: issue.state,
|
||||
assignees: issue.assignees.map(val => val.login),
|
||||
created: issue.created_at,
|
||||
updated: issue.updated_at,
|
||||
};
|
||||
|
@@ -60,5 +60,8 @@
|
||||
"prettier": "^2.2.1",
|
||||
"simple-git": "^2.46.0",
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"types-ramda": "0.29.4"
|
||||
}
|
||||
}
|
@@ -272,6 +272,7 @@ export async function doFindIssues() {
|
||||
title: issue.title,
|
||||
body: issue.body,
|
||||
state: issue.state,
|
||||
assignees: issue.assignees.map(val => val.login),
|
||||
created: issue.created_at,
|
||||
updated: issue.updated_at,
|
||||
};
|
||||
|
@@ -74,8 +74,8 @@ export async function doCreateIssue(
|
||||
|
||||
export async function doCreateLabel() {
|
||||
const name = core.getInput('label-name');
|
||||
const color = core.getInput('label-color') || 'ededed';
|
||||
const description = core.getInput('label-desc') || '';
|
||||
const color = core.getInput('label-color');
|
||||
const description = core.getInput('label-desc');
|
||||
|
||||
if (name) {
|
||||
await ICE.createLabel(name, color, description);
|
||||
|
@@ -80,8 +80,6 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
||||
const issueNumber = core.getInput('issue-number') || defaultCtxNumber;
|
||||
if (issueNumber) {
|
||||
this.issueNumber = +issueNumber;
|
||||
} else {
|
||||
core.warning(`'issue-number' is missing or this action not needed yet!`);
|
||||
}
|
||||
|
||||
this.emoji = core.getInput('emoji') || '';
|
||||
|
@@ -130,8 +130,8 @@ export class IssueCoreEngine implements IIssueCoreEngine {
|
||||
|
||||
public async createLabel(
|
||||
labelName: string,
|
||||
labelColor: string,
|
||||
labelDescription: string | undefined,
|
||||
labelColor: string = 'ededed',
|
||||
labelDescription: string = '',
|
||||
) {
|
||||
const { owner, repo, octokit } = this;
|
||||
await octokit.issues.createLabel({
|
||||
@@ -318,11 +318,19 @@ export class IssueCoreEngine implements IIssueCoreEngine {
|
||||
state: baseState,
|
||||
} = issue;
|
||||
|
||||
const baseLabelsName = baseLabels.map(({ name }: any) => name);
|
||||
const baseAssignessName = baseAssigness?.map(({ login }: any) => login);
|
||||
const baseLabelsName = baseLabels.map(({ name }) => name);
|
||||
const baseAssignessName = baseAssigness?.map(({ login }) => login);
|
||||
|
||||
const newBody = body ? (mode === 'append' ? `${baseBody}\n${body}` : body) : baseBody;
|
||||
|
||||
if (labels && labels.length) {
|
||||
for (const label of labels) {
|
||||
if (baseLabelsName && baseLabelsName.length && baseLabelsName.indexOf(label) < 0) {
|
||||
await this.createLabel(label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await octokit.issues.update({
|
||||
owner,
|
||||
repo,
|
||||
|
@@ -83,7 +83,7 @@ export interface IIssueCoreEngine {
|
||||
createIssueEmoji: (emoji: TEmoji[]) => Promise<void>;
|
||||
createLabel: (
|
||||
labelName: string,
|
||||
labelColor: string,
|
||||
labelColor: string | undefined,
|
||||
labelDescription: string | undefined,
|
||||
) => Promise<void>;
|
||||
|
||||
|
Reference in New Issue
Block a user