From 346af9d34ad33e5acb81821d25e08e0aaaa333e1 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 9 Jul 2023 03:14:20 +0200 Subject: [PATCH] tested a different way of naming commit messages in sentry (#713) * tested a different way of naming commit messages in sentry * improved how the message is calculated --- webclient/vite.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webclient/vite.config.ts b/webclient/vite.config.ts index b4e3116ee..302edf7d6 100644 --- a/webclient/vite.config.ts +++ b/webclient/vite.config.ts @@ -12,6 +12,8 @@ import pluginRewriteAll from "vite-plugin-rewrite-all"; import { sentryVitePlugin } from "@sentry/vite-plugin"; // https://vitejs.dev/config/ +let commit_message = process.env.GIT_COMMIT_MESSAGE || "development"; +commit_message = commit_message.replaceAll(/[^a-z0-9 ]+/gi, "_").replaceAll(/_$/g, "").trim(); export default defineConfig({ envDir: path.resolve(__dirname, "./env"), appType: "spa", @@ -66,7 +68,7 @@ export default defineConfig({ started: new Date().toISOString(), url: "https://nav.tum.de", }, - name: process.env.GIT_COMMIT_MESSAGE || "development", + name: commit_message, //setCommits: { // repo: "TUM-Dev/NavigaTUM", // commit: process.env.GIT_COMMIT_SHA || "development",