You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integrations/gitlab/src/webhooks.ts
+25-2Lines changed: 25 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,21 @@ import { triggerImport } from './sync';
6
6
import{GitLabRuntimeContext}from'./types';
7
7
import{computeConfigQueryKey}from'./utils';
8
8
9
+
interfaceGitLabCommit{
10
+
id: string;
11
+
message: string;
12
+
title: string;
13
+
timestamp: string;
14
+
url: string;
15
+
author: {
16
+
name: string;
17
+
email: string;
18
+
};
19
+
added: string[];
20
+
modified: string[];
21
+
removed: string[];
22
+
}
23
+
9
24
interfaceGitLabPushEvent{
10
25
object_kind: string;
11
26
before: string;
@@ -20,7 +35,7 @@ interface GitLabPushEvent {
20
35
project_id: number;
21
36
project: GitLabProject;
22
37
repository: any;
23
-
commits: any[];
38
+
commits: GitLabCommit[];
24
39
total_commits_count: number;
25
40
}
26
41
@@ -94,6 +109,12 @@ export async function handlePushEvent(context: GitLabRuntimeContext, payload: Gi
94
109
`handling push event on ref "${payload.ref}" of "${payload.repository.id}" (project "${payload.project.id}"): ${spaceInstallations.length} space configurations are affected`
95
110
);
96
111
112
+
// Gitlab push events do not include a head_commit property so we need to get it from
113
+
// the commits attribute which should contains the newest 20 commits:
0 commit comments