5454 },
5555 "source-id" : {"type" : "string" },
5656 "parent-id" : {"type" : "string" },
57+ "changelog-url-template" : {"type" : "string" },
5758 },
5859 "required" : ["type" ],
5960}
@@ -204,6 +205,7 @@ class ExternalState(abc.ABC):
204205 url : str
205206 version : t .Optional [str ]
206207 timestamp : t .Optional [datetime .datetime ]
208+ changelog_url : t .Optional [str ]
207209
208210 def _replace (self : _ES , ** kwargs ) -> _ES :
209211 return dataclasses .replace (self , ** kwargs )
@@ -286,6 +288,11 @@ def set_new_version(self, new_version: ExternalState, is_update: bool = True):
286288 )
287289 self .state |= self .State .OUTDATED
288290
291+ assert new_version .changelog_url is None
292+ new_version = new_version ._replace (
293+ changelog_url = self .current_version .changelog_url
294+ )
295+
289296 self .new_version = new_version
290297
291298 @property
@@ -358,6 +365,7 @@ def from_source_impl(
358365 checksum = MultiDigest .from_source (source )
359366 size = source .get ("size" )
360367 checker_data = source .get ("x-checker-data" , {})
368+ changelog_url = checker_data .get ("changelog-url-template" , None )
361369 arches = checker_data .get ("arches" ) or source .get ("only-arches" ) or ["x86_64" ]
362370
363371 obj = cls (
@@ -374,6 +382,7 @@ def from_source_impl(
374382 size = size ,
375383 version = None ,
376384 timestamp = None ,
385+ changelog_url = changelog_url ,
377386 ),
378387 None ,
379388 )
@@ -519,6 +528,7 @@ def from_source_impl(
519528 tag = source .get ("tag" )
520529 branch = source .get ("branch" )
521530 checker_data = source .get ("x-checker-data" , {})
531+ changelog_url = checker_data .get ("changelog-url-template" , None )
522532 arches = checker_data .get ("arches" ) or source .get ("only-arches" ) or ["x86_64" ]
523533
524534 obj = cls (
@@ -536,6 +546,7 @@ def from_source_impl(
536546 branch = branch ,
537547 version = None ,
538548 timestamp = None ,
549+ changelog_url = changelog_url ,
539550 ),
540551 None ,
541552 )
0 commit comments