Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix namespace extraction for ansible-core modules #185

Merged
merged 2 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/185-core-modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "Fix ``namespace`` extraction for ansible-core modules (https://github.com/ansible-community/antsibull-changelog/issues/184, https://github.com/ansible-community/antsibull-changelog/pull/185)."
3 changes: 2 additions & 1 deletion src/antsibull_changelog/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def jsondoc_to_metadata( # pylint: disable=too-many-arguments
docs = entrypoints["main"]
if category == "plugin" and plugin_type == "module":
if is_ansible_core_2_13:
last_dot = name.rindex(".")
last_dot = name.rfind(".")
if last_dot >= 0:
namespace = name[:last_dot]
name = name[last_dot + 1 :]
Expand Down Expand Up @@ -400,6 +400,7 @@ def _load_plugins_2_13(
plugin_name,
plugin_data,
category=category[:-1],
is_ansible_core_2_13=True,
)
plugins_data[category][plugin_type][
processed_data["name"]
Expand Down