Refine project role collaboration guidance

This commit is contained in:
2026-09-02 19:38:25 +08:00
parent 127bcc4ad3
commit af8596a8a2
38 changed files with 2154 additions and 902 deletions
+8 -8
View File
@@ -5,7 +5,7 @@ project_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
config_file="$project_root/.dingtalk/config.env"
usage() {
echo "Usage: ./scripts/dingtalk-progress <start|milestone|blocked|complete|failed> <summary>" >&2
echo "用法:./scripts/dingtalk-progress <start|milestone|blocked|complete|failed> <中文 Markdown 摘要>" >&2
}
if [ "$#" -lt 2 ]; then
@@ -109,18 +109,18 @@ if [ -z "$client_secret" ]; then
fi
case "$event_name" in
start) event_label="开始" ;;
milestone) event_label="里程碑" ;;
blocked) event_label="阻塞" ;;
complete) event_label="完成" ;;
failed) event_label="失败" ;;
start) event_label="开始推进" ;;
milestone) event_label="阶段里程碑" ;;
blocked) event_label="遇到阻塞" ;;
complete) event_label="本轮完成" ;;
failed) event_label="执行失败" ;;
esac
project_name=${DINGTALK_PROGRESS_PROJECT:-$(basename -- "$project_root")}
title_prefix=${DINGTALK_PROGRESS_TITLE_PREFIX:-[Agent进度]}
title_prefix=${DINGTALK_PROGRESS_TITLE_PREFIX:-[项目进度]}
title="$title_prefix $event_label"
timestamp=$(date '+%Y-%m-%d %H:%M:%S %Z')
body=$(printf '## %s\n\n- 项目:%s\n- 状态:%s\n- 时间:%s\n\n%s' \
body=$(printf '## %s\n\n**项目:** %s \n**状态:** %s \n**更新时间:** %s\n\n---\n\n%s' \
"$title" "$project_name" "$event_label" "$timestamp" "$summary")
msg_param=$(jq -cn --arg title "$title" --arg text "$body" '{title:$title,text:$text}')