From 048c8ffc118687c489dbe0e569a955ece7588998 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Mar 2025 04:12:08 -0600 Subject: [PATCH] feat: Add Docker image push notification in commit message extraction - Enhanced the extractCommitMessage function to include a specific message format for Docker image pushes when the user-agent indicates a Go-http-client. This improves clarity in deployment notifications by providing detailed information about the repository and the pusher. --- apps/dokploy/pages/api/deploy/[refreshToken].ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/dokploy/pages/api/deploy/[refreshToken].ts b/apps/dokploy/pages/api/deploy/[refreshToken].ts index f0674f0d..70dcd1d1 100644 --- a/apps/dokploy/pages/api/deploy/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/[refreshToken].ts @@ -272,6 +272,12 @@ export const extractCommitMessage = (headers: any, body: any) => { : "NEW COMMIT"; } + if (headers["user-agent"]?.includes("Go-http-client")) { + if (body.push_data && body.repository) { + return `Docker image pushed: ${body.repository.repo_name}:${body.push_data.tag} by ${body.push_data.pusher}`; + } + } + return "NEW CHANGES"; };