From 506c79a92050860bf59a7a0d2c30018e142f199d Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Tue, 18 Jul 2023 15:43:05 +0000 Subject: [PATCH] Use ansible-documentation repo for core porting guide As of https://github.com/ansible-community/community-topics/issues/240, the ansible documentation (including porting guides) are stored in a new repository. --- src/antsibull/changelog.py | 5 ++--- src/antsibull/constants.py | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) 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"