File tree Expand file tree Collapse file tree
apps/sim/connectors/azure-devops Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -794,6 +794,23 @@ async function listRepositoryBlobs(
794794 } )
795795 throw new Error ( `Failed to list repository items: ${ response . status } ` )
796796 }
797+ /**
798+ * The Items list API documents no pagination, but very large trees may emit
799+ * an `x-ms-continuationtoken` response header. No request parameter exists
800+ * to follow it, so when it appears the tree is treated as incomplete: the
801+ * listing is flagged so deletion reconciliation cannot remove files that
802+ * were never returned.
803+ */
804+ if ( response . headers . get ( 'x-ms-continuationtoken' ) ) {
805+ if ( syncContext ) syncContext . listingCapped = true
806+ logger . warn (
807+ 'Azure DevOps repository tree listing returned a continuation token; partial tree' ,
808+ {
809+ repoId,
810+ branch,
811+ }
812+ )
813+ }
797814 const data = await response . json ( )
798815 const items = ( data . value as GitItem [ ] | undefined ) ?? [ ]
799816 return items . filter ( ( item ) => item . gitObjectType === 'blob' && ! item . isFolder && item . path )
You can’t perform that action at this time.
0 commit comments