Skip to content

Commit

Permalink
Slighly safer checks
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorelli committed Jan 5, 2024
1 parent 1fe13e1 commit b9f654f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integrations/github/src/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function handlePushEvent(
const total = await handleImportDispatchForSpaces(context, {
configQuery: queryKey,
eventTimestamp: payload.head_commit?.timestamp
? new Date(payload.head_commit?.timestamp)
? new Date(payload.head_commit.timestamp)
: undefined,
});

Expand Down
2 changes: 1 addition & 1 deletion integrations/gitlab/src/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export async function handlePushEvent(context: GitLabRuntimeContext, payload: Gi

const total = await handleImportDispatchForSpaces(context, {
configQuery: queryKey,
eventTimestamp: headCommit ? new Date(headCommit.timestamp) : undefined,
eventTimestamp: headCommit?.timestamp ? new Date(headCommit.timestamp) : undefined,
});

logger.debug(`${total} space configurations are affected`);
Expand Down

0 comments on commit b9f654f

Please sign in to comment.