diff --git a/package.json b/package.json index b0456cc..2adedbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coderabbitai/bitbucket", - "version": "1.1.0", + "version": "1.1.1", "description": "CodeRabbit's TypeScript API client for connecting to Bitbucket Cloud and Bitbucket Data Center", "keywords": [ "bitbucket-api-v1", diff --git a/src/server/interfaces/schema_rest_pull_request_activity.ts b/src/server/interfaces/schema_rest_pull_request_activity.ts index 421088d..46fa2e7 100644 --- a/src/server/interfaces/schema_rest_pull_request_activity.ts +++ b/src/server/interfaces/schema_rest_pull_request_activity.ts @@ -29,19 +29,19 @@ export interface SchemaRestPullRequestActivityUpdated } export function isSchemaRestPullRequestActivityCommented( - activity: SchemaRestPullRequestActivity, + activity?: SchemaRestPullRequestActivity | SchemaRestPullRequestActivityBase, ): activity is SchemaRestPullRequestActivityCommented { - return activity.action === "COMMENTED" + return activity?.action === "COMMENTED" } export function isSchemaRestPullRequestActivityOpened( - activity: SchemaRestPullRequestActivity, + activity?: SchemaRestPullRequestActivity | SchemaRestPullRequestActivityBase, ): activity is SchemaRestPullRequestActivityOpened { - return activity.action === "OPENED" + return activity?.action === "OPENED" } export function isSchemaRestPullRequestActivityUpdated( - activity: SchemaRestPullRequestActivity, + activity?: SchemaRestPullRequestActivity | SchemaRestPullRequestActivityBase, ): activity is SchemaRestPullRequestActivityUpdated { - return activity.action === "UPDATED" + return activity?.action === "UPDATED" }