File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,10 @@ export class RepoPermissionSyncer {
257257 const client = createBitbucketCloudClient ( config . user , credentials . token ) ;
258258
259259 const parsedMetadata = repoMetadataSchema . safeParse ( repo . metadata ) ;
260- const bitbucketCloudMetadata = parsedMetadata . success ? parsedMetadata . data . codeHostMetadata ?. bitbucketCloud : undefined ;
260+ if ( ! parsedMetadata . success ) {
261+ throw new Error ( `Repo ${ id } has invalid metadata: ${ JSON . stringify ( parsedMetadata . error . errors ) } ` ) ;
262+ }
263+ const bitbucketCloudMetadata = parsedMetadata . data . codeHostMetadata ?. bitbucketCloud ;
261264 if ( ! bitbucketCloudMetadata ) {
262265 throw new Error ( `Repo ${ id } is missing required Bitbucket Cloud metadata (workspace/repoSlug)` ) ;
263266 }
@@ -285,7 +288,7 @@ export class RepoPermissionSyncer {
285288
286289 return {
287290 accountIds : accounts . map ( account => account . id ) ,
288- // Since we only fetch users who have been explicitly granted accesss to the repo,
291+ // Since we only fetch users who have been explicitly granted access to the repo,
289292 // this is a partial sync.
290293 isPartialSync : true ,
291294 }
You can’t perform that action at this time.
0 commit comments