From d2033cfd7ee79b8b225c8985cc0501c4ccf4e16c Mon Sep 17 00:00:00 2001 From: Lesords <2385342343@qq.com> Date: Wed, 8 Jan 2025 07:06:59 +0000 Subject: [PATCH] fix: solve the problem that the label may be cancelled by mistake feat: add some output information --- tools/stale.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/stale.sh b/tools/stale.sh index bd00f3a..be88805 100755 --- a/tools/stale.sh +++ b/tools/stale.sh @@ -47,25 +47,30 @@ function main() { dis_time=$(getTimeDiff $create_time) if [ "$dis_time" -gt "$time_before_issue_stale" ]; then + echo "This issue needs to add stale label" commentAndLabel fi continue fi + last_comment_user=$(echo "$last_comment" | jq -r '.author.login') last_comment_time=$(echo "$last_comment" | jq -r '.createdAt') dis_time=$(getTimeDiff $last_comment_time) if [ "$is_stale" ]; then if [ "$dis_time" -gt "$time_before_issue_close" ]; then + echo "This issue needs to be closed" commentAndClose continue fi if [ "$last_comment_user" != "github-actions" ]; then + echo "This issue needs to be removed from the stale state" unLabel fi else if [ "$dis_time" -gt "$time_before_issue_stale" ]; then + echo "This issue needs to add stale label" commentAndLabel fi fi