Skip to content

Commit

Permalink
docs: update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Jul 27, 2023
1 parent 9a2f8c1 commit 25379ae
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
🛠 refactor
-->

## v3.5.1

`2023.07.27`

- 💄 perf: `inactive-mode` support `issue-created` `comment-created`.

## v3.5.0

`2023.07.19`
Expand Down
27 changes: 19 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16408,16 +16408,27 @@ function doQueryIssues(state, creator, ignoreLabels) {
dayjs_1.default.extend(utc_1.default);
dayjs_1.default.extend(isSameOrBefore_1.default);
const lastTime = dayjs_1.default.utc().subtract(+inactiveDay, 'day');
const inactiveMode = core.getInput('inactive-mode') || 'issue';
let updateTime = dayjs_1.default.utc(issue.updated_at);
if (inactiveMode === 'comment') {
ICE.setIssueNumber(issue.number);
const comments = yield ICE.listComments();
if (comments.length) {
updateTime = dayjs_1.default.utc(comments[comments.length - 1].updated_at);
const inactiveMode = (0, actions_util_1.dealStringToArr)(core.getInput('inactive-mode'));
let checkTime = null;
for (const mode of inactiveMode) {
if (checkTime) {
break;
}
if (mode === 'comment' || mode === 'comment-created') {
ICE.setIssueNumber(issue.number);
const comments = yield ICE.listComments();
if (comments.length) {
checkTime = dayjs_1.default.utc(comments[comments.length - 1][mode === 'comment' ? 'updated_at' : 'created_at']);
}
}
if (mode === 'issue-created') {
checkTime = dayjs_1.default.utc(issue.created_at);
}
}
if (!checkTime) {
checkTime = dayjs_1.default.utc(issue.updated_at);
}
if (updateTime && updateTime.isSameOrBefore(lastTime)) {
if (checkTime && checkTime.isSameOrBefore(lastTime)) {
issues.push(issue);
issueNumbers.push(issue.number);
}
Expand Down

0 comments on commit 25379ae

Please sign in to comment.