Skip to content

Commit 9b8040f

Browse files
Sometimes dependabot doesn't use its name in the body
1 parent ae44326 commit 9b8040f

5 files changed

Lines changed: 10 additions & 6 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.5
42+
image: ghcr.io/digitallyrefined/containers-up:1.4.6
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.5
66+
image: ghcr.io/digitallyrefined/containers-up:1.4.6
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.5
4+
image: ghcr.io/digitallyrefined/containers-up:1.4.6
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.5",
3+
"version": "1.4.6",
44
"description": "Containers Up! a web based platform designed to manage and update containers",
55
"author": "DigitallyRefined",
66
"license": "ISC",

src/backend/endpoints/webhook/common.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type WebhookEvent = {
1313
number: number;
1414
action: string;
1515
merged: boolean | string;
16+
userLogin?: string;
1617
title: string;
1718
body?: string;
1819
labels?: { name: string }[];
@@ -29,11 +30,13 @@ export const commonWebhookHandler = async (
2930
hostConfig: Host,
3031
options: WebhookHandlerOptions
3132
) => {
32-
const { action, merged, title, number, body } = webhookEvent;
33+
const { number, action, merged, userLogin, title, body } = webhookEvent;
3334
const { eventName, folder } = options;
3435

3536
const botKeyword = hostConfig.botType === 'renovate' ? 'renovate' : 'dependabot';
36-
const isBot = body?.toLowerCase().includes(botKeyword) ?? false;
37+
const isBot =
38+
(userLogin?.toLowerCase().includes(botKeyword) || body?.toLowerCase().includes(botKeyword)) ??
39+
false;
3740

3841
const event = `${eventName} ${hostConfig.name} ${folder || 'auto'}`;
3942
const logger = mainLogger.child({ event });

src/backend/endpoints/webhook/request-handler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export const handleWebhookRequest = async (
7373
number: webhookData.pull_request?.number,
7474
action: webhookData.action,
7575
merged: webhookData.pull_request?.merged,
76+
userLogin: webhookData.pull_request?.user?.login,
7677
title: webhookData.pull_request?.title,
7778
body: webhookData.pull_request?.body,
7879
labels: webhookData.pull_request?.labels,

0 commit comments

Comments
 (0)