File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
aws_doc_sdk_examples_tools Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ class Version:
7676 authors : List [Person ] = field (default_factory = list )
7777 # Feedback and maintenance owner. Primarily for internal use.
7878 owner : Optional [FeedbackCti ] = field (default = None )
79+ # Link to the original tributary that contributed this version.
80+ source : Optional [Url ] = field (default = None )
7981
8082 def validate (self , errors : MetadataErrors , root : Path ):
8183 github = self .github
Original file line number Diff line number Diff line change @@ -295,6 +295,14 @@ def version_from_yaml(
295295 metadata_errors .AddServicesHasBeenDeprecated (add_services = add_services )
296296 )
297297
298+ source = None
299+ if source_url := yaml .get ("source" , None ):
300+ source_url = url_from_yaml (source_url )
301+ if isinstance (source_url , Url ):
302+ source = source_url
303+ elif source_url is not None :
304+ errors .append (source_url )
305+
298306 if block_content is not None and block_content not in cross_content_blocks :
299307 errors .append (metadata_errors .MissingCrossContent (block = block_content ))
300308
@@ -312,6 +320,7 @@ def version_from_yaml(
312320 more_info ,
313321 authors ,
314322 owner ,
323+ source ,
315324 ),
316325 errors ,
317326 )
You can’t perform that action at this time.
0 commit comments