Skip to content

Commit efcbac9

Browse files
KB-perByteaudgirka
authored andcommitted
ah fix
1 parent 677e685 commit efcbac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ansiblelint/rules/galaxy.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class GalaxyRule(AnsibleLintRule):
3737
def matchplay(self, file: Lintable, data: dict[str, Any]) -> list[MatchError]:
3838
"""Return matches found for a specific play (entry in playbook)."""
3939
changelog_file_data = []
40+
global CHANGELOG_FILE
4041
if file.kind == "changelog":
41-
global CHANGELOG_FILE
42-
CHANGELOG_FILE = list(changelog_file_data.data.get("releases", None).keys())
42+
CHANGELOG_FILE = list(file.data.get("releases", None).keys())
4343

4444
if file.kind != "galaxy": # type: ignore[comparison-overlap]
4545
return []
@@ -102,7 +102,7 @@ def matchplay(self, file: Lintable, data: dict[str, Any]) -> list[MatchError]:
102102
),
103103
)
104104
else:
105-
if Version(data.get("version")) != Version(changelog_file_data[-2]):
105+
if Version(data.get("version")) != Version(changelog_file_data[-3]):
106106
results.append(
107107
self.create_matcherror(
108108
message="Version in galaxy.yaml and the latest version in changelog should be same.",

0 commit comments

Comments
 (0)