@@ -280,7 +280,8 @@ await RetryHelper.RetryAsync(
280280 Properties = ConvertPropertiesToImmutableDictionary ( details . Properties )
281281 . SetItem ( HelixJobInfo . PreviousHelixJobNamePropertyName , originalJobName ) ,
282282 } ;
283- if ( TryParseSource ( details . Source , out string sourcePrefix , out string teamProject , out string repository , out string branch ) )
283+ if ( TryGetSourceMetadataFromProperties ( details . Properties , out string sourcePrefix , out string teamProject , out string repository , out string branch )
284+ || TryParseSource ( details . Source , out sourcePrefix , out teamProject , out repository , out branch ) )
284285 {
285286 creationRequest . SourcePrefix = sourcePrefix ;
286287 creationRequest . TeamProject = teamProject ;
@@ -345,6 +346,23 @@ private static ImmutableDictionary<string, string> ConvertPropertiesToImmutableD
345346 return builder . ToImmutable ( ) ;
346347 }
347348
349+ private static bool TryGetSourceMetadataFromProperties (
350+ JToken properties ,
351+ out string sourcePrefix ,
352+ out string teamProject ,
353+ out string repository ,
354+ out string branch )
355+ {
356+ sourcePrefix = GetStringPropertyFromProperties ( properties , "SourcePrefix" ) ;
357+ teamProject = GetStringPropertyFromProperties ( properties , "TeamProject" ) ;
358+ repository = GetStringPropertyFromProperties ( properties , "Repository" ) ;
359+ branch = GetStringPropertyFromProperties ( properties , "Branch" ) ;
360+ return ! string . IsNullOrWhiteSpace ( sourcePrefix )
361+ && ! string . IsNullOrWhiteSpace ( teamProject )
362+ && ! string . IsNullOrWhiteSpace ( repository )
363+ && ! string . IsNullOrWhiteSpace ( branch ) ;
364+ }
365+
348366 private static bool TryParseSource (
349367 string source ,
350368 out string sourcePrefix ,
0 commit comments