diff --git a/src/antsibull/changelog.py b/src/antsibull/changelog.py index b2820328..21d0734b 100644 --- a/src/antsibull/changelog.py +++ b/src/antsibull/changelog.py @@ -33,6 +33,7 @@ from semantic_version import Version as SemVer from antsibull.collection_meta import CollectionsMetadata +from antsibull.constants import CORE_PORTING_GUIDE_BASE_URL class ChangelogData: @@ -320,9 +321,7 @@ async def download_changelog( self.changelog = ChangelogData.concatenate(changelogs) async def download_porting_guide(self, aio_session: aiohttp.client.ClientSession): - branch_url = "https://raw.githubusercontent.com/ansible/ansible/devel" - - query_url = f"{branch_url}/{get_porting_guide_filename(self.latest)}" + query_url = f"{CORE_PORTING_GUIDE_BASE_URL}/{get_porting_guide_filename(self.latest)}" async with aio_session.get(query_url) as response: self.porting_guide = await response.read() diff --git a/src/antsibull/constants.py b/src/antsibull/constants.py index 9ba36ca0..0449ccb3 100644 --- a/src/antsibull/constants.py +++ b/src/antsibull/constants.py @@ -22,3 +22,5 @@ DOCSITE_COMMUNITY_URL = "https://docs.ansible.com/ansible/latest/community" COLLECTION_EXCLUDE_DIRS = ("docs", "tests") + +CORE_PORTING_GUIDE_BASE_URL = "https://raw.githubusercontent.com/ansible/ansible-documentation/devel"