🔧Chore: 增加日志
This commit is contained in:
@@ -23,6 +23,7 @@ public class HookController {
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public ResponseEntity<String> handlePush(@RequestBody GiteaPushEvent event) {
|
public ResponseEntity<String> handlePush(@RequestBody GiteaPushEvent event) {
|
||||||
log.info(event.toString());
|
log.info(event.toString());
|
||||||
|
log.info("\n============================\n");
|
||||||
hookService.handlePush(event);
|
hookService.handlePush(event);
|
||||||
return ResponseEntity.ok("Ciallo~(∠・ω< )⌒★");
|
return ResponseEntity.ok("Ciallo~(∠・ω< )⌒★");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ package cn.hezhaohui.webhook.service;
|
|||||||
import cn.hezhaohui.lark.entity.CardData;
|
import cn.hezhaohui.lark.entity.CardData;
|
||||||
import cn.hezhaohui.lark.util.Lark;
|
import cn.hezhaohui.lark.util.Lark;
|
||||||
import cn.hezhaohui.webhook.entity.GiteaPushEvent;
|
import cn.hezhaohui.webhook.entity.GiteaPushEvent;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class HookService {
|
public class HookService {
|
||||||
|
|
||||||
public void handlePush(GiteaPushEvent event) {
|
public void handlePush(GiteaPushEvent event) {
|
||||||
@@ -28,6 +30,11 @@ public class HookService {
|
|||||||
.flatMap(commit -> commit.getModified().stream())
|
.flatMap(commit -> commit.getModified().stream())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
|
log.info("commitMsgList: {}\n", commitMsgList);
|
||||||
|
log.info("addedFiles: {}\n", addedFiles);
|
||||||
|
log.info("removedFiles: {}\n", removedFiles);
|
||||||
|
log.info("modifiedFiles: {}\n", modifiedFiles);
|
||||||
|
|
||||||
// TODO: 调用 AI 模块
|
// TODO: 调用 AI 模块
|
||||||
|
|
||||||
CardData cardData = CardData.builder()
|
CardData cardData = CardData.builder()
|
||||||
|
|||||||
Reference in New Issue
Block a user