From 197fbe9d814d0a0ff0cf1f2c1284f1ba62ee781a Mon Sep 17 00:00:00 2001 From: --git_token Date: Sat, 4 Apr 2026 08:59:44 +0800 Subject: [PATCH] auto backup 2026-04-04 08:59:44 --- .vala_skill_hashes | 2 +- skills/vala_git_workspace_backup/scripts/backup.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.vala_skill_hashes b/.vala_skill_hashes index 9137f48..8261556 100644 --- a/.vala_skill_hashes +++ b/.vala_skill_hashes @@ -1,4 +1,4 @@ logs e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 lark_wiki_operate_as_bot.vala f84c308bcb69280520dadf9458177d9c4af192d60cf409528bd65e13f3e67e0a user-feedback-collector e02a2d4ee3914c393c1c683779c40787128b9163eecccf175531afc19b6d21a9 -vala_git_workspace_backup 4c3e6fa1b53e6f5610e8982d5ada9fcfeea16da8107c0b9ed70cafc866337528 +vala_git_workspace_backup e157b1d2afd8658df6dce1f75a41d42b2f27c1b349559e0baa6d0a787cc9d81d diff --git a/skills/vala_git_workspace_backup/scripts/backup.sh b/skills/vala_git_workspace_backup/scripts/backup.sh index 96e8179..ffe5c3c 100755 --- a/skills/vala_git_workspace_backup/scripts/backup.sh +++ b/skills/vala_git_workspace_backup/scripts/backup.sh @@ -11,7 +11,10 @@ git push origin main if [ $? -eq 0 ]; then echo "✅ 备份完成:$(date)" # 备份成功给李若松发送通知 - /root/.nvm/versions/node/v24.14.0/bin/node /root/.nvm/versions/node/v24.14.0/bin/openclaw message send --channel feishu --target "user:4aagb443" --message "✅ 工作区自动备份成功,已同步到公司Git仓库" + APP_ID=$(jq -r '.apps[0].appId' /root/.openclaw/credentials/xiaokui/config.json) + APP_SECRET=$(jq -r '.apps[0].appSecret' /root/.openclaw/credentials/xiaokui/config.json) + TOKEN=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" -H "Content-Type: application/json" -d "{\"app_id\":\"$APP_ID\",\"app_secret\":\"$APP_SECRET\"}" | jq -r '.tenant_access_token') + curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=user_id" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"receive_id": "4aagb443", "msg_type": "text", "content": "{\"text\":\"✅ 工作区自动备份成功,已同步到公司Git仓库\"}"}' > /dev/null 2>&1 else echo "❌ 备份失败:$(date)" exit 1