Skip to content

Commit

Permalink
Use ansible-documentation repo for core porting guide
Browse files Browse the repository at this point in the history
As of ansible-community/community-topics#240,
the ansible documentation (including porting guides) are stored in a new
repository.
  • Loading branch information
gotmax23 committed Jul 18, 2023
1 parent f6fda44 commit 0bc2987
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelogs/fragments/540.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bugfixes:
- Retrieve the ansible-core Porting Guide from the ansible-documentation
repo. These files are being removed from the ansible-core repo
(https://github.com/ansible-community/antsibull/pull/540).
7 changes: 4 additions & 3 deletions src/antsibull/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -320,9 +321,9 @@ 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()

Expand Down
4 changes: 4 additions & 0 deletions src/antsibull/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
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"
)

0 comments on commit 0bc2987

Please sign in to comment.