Skip to content

Commit

Permalink
Fix namespace extraction for ansible-core modules (#185)
Browse files Browse the repository at this point in the history
* Fix namespace extraction for ansible-core modules.

* Make sure the correct code-path is used for ansible-core 2.13+ output, and fix codepath.
  • Loading branch information
felixfontein authored Oct 27, 2024
1 parent eea355c commit 2fe1349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 2fe1349

Please sign in to comment.