mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
refactor: change to title-excludes
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
`2021.03.21`
|
||||
|
||||
- feat: Added `title-remove` parameter to `check-issue`. [#65](https://github.com/actions-cool/issues-helper/pull/65)
|
||||
- feat: Added `title-excludes` parameter to `check-issue`. [#65](https://github.com/actions-cool/issues-helper/pull/65)
|
||||
|
||||
## v2.1.2
|
||||
|
||||
|
@@ -796,7 +796,7 @@ jobs:
|
||||
| issue-number | The number of issue | number | ✔ |
|
||||
| assignee-includes | Assignees contains check | string | ✖ |
|
||||
| title-includes | Title contains check | string | ✖ |
|
||||
| title-remove | Check whether the title is empty after removing the default title | string | ✖ |
|
||||
| title-excludes | Check whether the title is empty after removing the default title | string | ✖ |
|
||||
| body-includes | Body contains check | string | ✖ |
|
||||
|
||||
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
||||
|
@@ -794,7 +794,7 @@ jobs:
|
||||
| issue-number | 指定的 issue | number | ✔ |
|
||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||
| title-includes | 标题包含校验 | string | ✖ |
|
||||
| title-remove | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||
| body-includes | 内容包含校验 | string | ✖ |
|
||||
|
||||
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
||||
|
@@ -54,7 +54,7 @@ inputs:
|
||||
body-includes:
|
||||
description: 'Query use'
|
||||
# check
|
||||
title-remove:
|
||||
title-excludes:
|
||||
description: 'Remove some to check title whether empty.'
|
||||
title-includes:
|
||||
description: 'Query use'
|
||||
|
269
dist/index.js
vendored
269
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -89,7 +89,7 @@ jobs:
|
||||
| issue-number | The number of issue | number | ✔ |
|
||||
| assignee-includes | Assignees contains check | string | ✖ |
|
||||
| title-includes | Title contains check | string | ✖ |
|
||||
| title-remove | Check whether the title is empty after removing the default title | string | ✖ |
|
||||
| title-excludes | Check whether the title is empty after removing the default title | string | ✖ |
|
||||
| body-includes | Body contains check | string | ✖ |
|
||||
|
||||
- `title-includes` `body-includes` supports the format `x1,x2` or `x1,x2/y1,y2`. Only supports two levels
|
||||
|
@@ -85,7 +85,7 @@ jobs:
|
||||
| issue-number | 指定的 issue | number | ✔ |
|
||||
| assignee-includes | 是否包含指定人 | string | ✖ |
|
||||
| title-includes | 标题包含校验 | string | ✖ |
|
||||
| title-remove | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||
| title-excludes | 检测标题移除默认 title 后是否为空 | string | ✖ |
|
||||
| body-includes | 内容包含校验 | string | ✖ |
|
||||
|
||||
- `title-includes` `body-includes` 支持格式 `x1,x2` 或者 `x1,x2/y1,y2`。只支持两个层级
|
||||
|
@@ -42,7 +42,7 @@
|
||||
"@vercel/ncc": "^0.25.1",
|
||||
"common-tags": "^1.8.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"dumi": "^1.1.7",
|
||||
"dumi": "1.1.7",
|
||||
"gh-pages": "^3.1.0",
|
||||
"react": "^17.0.1"
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ direction = direction === 'desc' ? 'desc' : 'asc';
|
||||
const commentAuth = core.getInput('comment-auth');
|
||||
const bodyIncludes = core.getInput('body-includes');
|
||||
const titleIncludes = core.getInput('title-includes');
|
||||
const titleRemove = core.getInput('title-remove');
|
||||
const titleRemove = core.getInput('title-excludes');
|
||||
const assigneeIncludes = core.getInput('assignee-includes');
|
||||
|
||||
let issueState = core.getInput('issue-state') || 'open';
|
||||
@@ -221,9 +221,7 @@ async function doMonthStatistics(owner, repo, labels, assignees) {
|
||||
});
|
||||
}
|
||||
}
|
||||
let now = dayjs()
|
||||
.utc()
|
||||
.format('YYYY-MM-DD HH:mm:ss');
|
||||
let now = dayjs().utc().format('YYYY-MM-DD HH:mm:ss');
|
||||
let body = `
|
||||
- Created time: ${now}
|
||||
|
||||
|
@@ -110,11 +110,7 @@ async function getIssuesInMonth(owner, repo, thisMonth, page = 1) {
|
||||
|
||||
// **************************************************************************
|
||||
function getCreatedMonth(d) {
|
||||
return (
|
||||
dayjs(d)
|
||||
.utc()
|
||||
.month() + 1
|
||||
);
|
||||
return dayjs(d).utc().month() + 1;
|
||||
}
|
||||
|
||||
// **************************************************************************
|
||||
|
Reference in New Issue
Block a user