Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Make commit message optional
Carlos Monastyrskiec0f98bb7fd2
diff --git a/backend/src/ee/routes/v1/pit-router.ts b/backend/src/ee/routes/v1/pit-router.tsindex 26909d294b..3fa9926018 100644--- a/backend/src/ee/routes/v1/pit-router.ts+++ b/backend/src/ee/routes/v1/pit-router.ts@@ -435,14 +435,7 @@ export const registerPITRouter = async (server: FastifyZodProvider) => {projectId: z.string().trim(),environment: z.string().trim(),secretPath: z.string().trim().default("/").transform(removeTrailingSlash),- message: z- .string()- .trim()- .min(1)- .max(255)- .refine((message) => message.trim() !== "", {- message: "Commit message cannot be empty"- }),+ message: z.string().trim().max(255).optional(),changes: z.object({secrets: z.object({create: z@@ -546,7 +539,7 @@ export const registerPITRouter = async (server: FastifyZodProvider) => {projectId: req.body.projectId,environment: req.body.environment,secretPath: req.body.secretPath,- message: req.body.message,+ message: req.body.message || "",changes: {secrets: req.body.changes.secrets,folders: req.body.changes.folders@@ -564,7 +557,7 @@ export const registerPITRouter = async (server: FastifyZodProvider) => {projectId: req.body.projectId,environment: req.body.environment,secretPath: req.body.secretPath,- message: req.body.message+ message: req.body.message || ""}}});diff --git a/frontend/src/pages/secret-manager/CommitsPage/components/CommitHistoryTab/CommitHistoryTab.tsx b/frontend/src/pages/secret-manager/CommitsPage/components/CommitHistoryTab/CommitHistoryTab.tsxindex 3ca2f05e31..ea25ecd34e 100644--- a/frontend/src/pages/secret-manager/CommitsPage/components/CommitHistoryTab/CommitHistoryTab.tsx+++ b/frontend/src/pages/secret-manager/CommitsPage/components/CommitHistoryTab/CommitHistoryTab.tsx@@ -39,7 +39,7 @@ const CommitItem = ({<div className="flex gap-2 px-4 py-3 transition-colors duration-200 hover:bg-zinc-800"><div className="flex min-w-0 flex-1 flex-col items-start"><p className="block w-full truncate text-left text-sm text-mineshaft-100">- {commit.message}+ {commit.message || <span className="text-mineshaft-400 italic">No message</span>}</p><p className="text-left text-xs text-mineshaft-300">{commit.actorMetadata?.email || commit.actorMetadata?.name || commit.actorType}{" "}diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsxindex 07f12d167a..20ad815acd 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx@@ -293,9 +293,6 @@ export const CommitForm: React.FC<CommitFormProps> = ({}const handleCommit = async () => {- if (!commitMessage.trim()) {- return;- }await onCommit(pendingChanges, commitMessage);clearAllPendingChanges({projectId,@@ -432,7 +429,7 @@ export const CommitForm: React.FC<CommitFormProps> = ({{/* Commit Message */}<div><label className="mb-2 block text-sm font-medium text-mineshaft-200">- Commit Message <span className="text-red-400">*</span>+ Commit Message</label><Inputvalue={commitMessage}@@ -440,7 +437,6 @@ export const CommitForm: React.FC<CommitFormProps> = ({placeholder="Describe your changes..."className="w-full"autoFocus- required/></div>@@ -457,7 +453,7 @@ export const CommitForm: React.FC<CommitFormProps> = ({<ButtononClick={handleCommit}isLoading={isCommitting}- isDisabled={isCommitting || !commitMessage.trim()}+ isDisabled={isCommitting}leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}colorSchema="primary"variant="outline_bg"