diff --git a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java deleted file mode 100644 index 497a1eb..0000000 --- a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/constant/Payload.java +++ /dev/null @@ -1,7 +0,0 @@ -package cn.hezhaohui.webhook.constant; - - - -public class Payload { - public final static String SECRET = "dn293830"; -} diff --git a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java index ef48d33..ce1b36e 100644 --- a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java +++ b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java @@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import static cn.hezhaohui.webhook.constant.Payload.SECRET; @RestController @RequestMapping("/hook") @@ -23,10 +22,6 @@ public class HookController { public void handlePush(@RequestBody GiteaPushEvent event) { log.info(event.toString()); - if(!SECRET.equals(event.getSecret())) { - return; - } - hookService.handlePush(event); } }