Skip to content

Commit bd29d03

Browse files
committed
fix: gitlab 404
1 parent e8f39b1 commit bd29d03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/features/createGitlabNotificationData.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@ export async function prepareGitlabNotificationData(events: GitlabEventWithRepoD
6060
const firstEvent = item.events[0];
6161
const { target_type } = firstEvent;
6262
if (target_type === 'Milestone') return item;
63-
const isNote =
64-
target_type === 'Note' || target_type === 'DiffNote' || target_type === 'DiscussionNote';
63+
const isNote = target_type?.includes('Note');
6564
let type: 'Issue' | 'MergeRequest' = 'MergeRequest';
6665
if (
6766
(isNote && firstEvent.note.noteable_type === 'Issue') ||
6867
('target_type' in firstEvent && target_type === 'Issue')
6968
) {
7069
type = 'Issue';
7170
}
71+
console.log('event', firstEvent);
72+
7273
const data = await fetchGitlab<GitlabMergeRequest | GitlabIssue>(
7374
`projects/${firstEvent.repository.encoded}/${
7475
type === 'Issue' ? 'issues' : 'merge_requests'

0 commit comments

Comments
 (0)