Skip to content

Commit 719c534

Browse files
Fix commit & notification escaping
1 parent a49a639 commit 719c534

5 files changed

Lines changed: 7 additions & 9 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The app can be started using the following `compose.yml`:
3939
services:
4040
containers-up:
4141
# https://github.com/DigitallyRefined/containers-up/releases
42-
image: ghcr.io/digitallyrefined/containers-up:1.4.4
42+
image: ghcr.io/digitallyrefined/containers-up:1.4.5
4343
restart: unless-stopped
4444
ports:
4545
- 3000:3000
@@ -63,7 +63,7 @@ Optional system wide configuration can be changed by copying `.env.default` to `
6363
services:
6464
containers-up:
6565
# https://github.com/DigitallyRefined/containers-up/releases
66-
image: ghcr.io/digitallyrefined/containers-up:1.4.4
66+
image: ghcr.io/digitallyrefined/containers-up:1.4.5
6767
restart: unless-stopped
6868
volumes:
6969
- ./containers-up/storage:/storage

compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
containers-up:
33
# https://github.com/DigitallyRefined/containers-up/releases
4-
image: ghcr.io/digitallyrefined/containers-up:1.4.4
4+
image: ghcr.io/digitallyrefined/containers-up:1.4.5
55
container_name: containers-up
66
restart: unless-stopped
77
volumes:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "containers-up",
3-
"version": "1.4.4",
3+
"version": "1.4.5",
44
"description": "Containers Up! a web based platform designed to manage and update containers",
55
"author": "DigitallyRefined",
66
"license": "ISC",

src/backend/utils/git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SQUASH_UPDATE_MESSAGE = process.env.SQUASH_UPDATE_MESSAGE || 'Update depen
1010
const SQUASH_DEPS_DAYS_AGO = Number.parseInt(process.env.SQUASH_DAYS_AGO || '5');
1111
const SQUASH_MAX_UPDATE_COMMITS = Number.parseInt(process.env.SQUASH_MAX_UPDATE_COMMITS || '5');
1212
const GIT_SQUASH_USER =
13-
"GIT_AUTHOR_NAME='Containers Up!' GIT_AUTHOR_EMAIL='260200075+containers-up@users.noreply.github.com'";
13+
'GIT_AUTHOR_NAME="Containers Up!" GIT_AUTHOR_EMAIL="260200075+containers-up@users.noreply.github.com"';
1414

1515
const buildMessage = (subject: string, body?: string) => {
1616
const parts = [subject, body].filter(Boolean);
@@ -179,7 +179,7 @@ export const squashUpdates = async (
179179
const prevCommit = await getCommitMetadata(sshRun, 1);
180180

181181
const isAutomatedAuthor = (authorName: string) =>
182-
/dependabot|renovate|containers-up/i.test(authorName);
182+
/dependabot|renovate|containers up/i.test(authorName);
183183
const X_DAYS_AGO = Date.now() - SQUASH_DEPS_DAYS_AGO * 24 * 60 * 60 * 1000;
184184

185185
if (

src/backend/utils/notification.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ const event = 'notification';
55
const logger = mainLogger.child({ event });
66
const exec = createExec(logger);
77

8-
const bashEscapeSingleQuoted = (content: string) => {
9-
return `'${content.replace(/'/g, `'\\''`)}'`;
10-
};
8+
const bashEscapeSingleQuoted = (content: string) => `'${content.replace(/'/g, "'\\''")}'`;
119

1210
export const sendNotification = async ({
1311
hostName,

0 commit comments

Comments
 (0)