🔧Chore: 增加日志

This commit is contained in:
2025-10-13 15:07:26 +08:00
parent ef2bd4ec21
commit 7866db7cbb
2 changed files with 8 additions and 0 deletions
@@ -23,6 +23,7 @@ public class HookController {
@PostMapping
public ResponseEntity<String> handlePush(@RequestBody GiteaPushEvent event) {
log.info(event.toString());
log.info("\n============================\n");
hookService.handlePush(event);
return ResponseEntity.ok("Ciallo~(∠・ω< )⌒★");
}
@@ -3,12 +3,14 @@ package cn.hezhaohui.webhook.service;
import cn.hezhaohui.lark.entity.CardData;
import cn.hezhaohui.lark.util.Lark;
import cn.hezhaohui.webhook.entity.GiteaPushEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Stream;
@Service
@Slf4j
public class HookService {
public void handlePush(GiteaPushEvent event) {
@@ -28,6 +30,11 @@ public class HookService {
.flatMap(commit -> commit.getModified().stream())
.toList();
log.info("commitMsgList: {}\n", commitMsgList);
log.info("addedFiles: {}\n", addedFiles);
log.info("removedFiles: {}\n", removedFiles);
log.info("modifiedFiles: {}\n", modifiedFiles);
// TODO: 调用 AI 模块
CardData cardData = CardData.builder()