Skip to content

Commit

Permalink
ah fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KB-perByte committed Jan 26, 2024
1 parent 6107972 commit 759c0f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ansiblelint/rules/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class GalaxyRule(AnsibleLintRule):
def matchplay(self, file: Lintable, data: dict[str, Any]) -> list[MatchError]:
"""Return matches found for a specific play (entry in playbook)."""
changelog_file_data = []
global CHANGELOG_FILE
if file.kind == "changelog":
global CHANGELOG_FILE
CHANGELOG_FILE = list(changelog_file_data.data.get("releases", None).keys())
CHANGELOG_FILE = list(file.data.get("releases", None).keys())

if file.kind != "galaxy": # type: ignore[comparison-overlap]
return []
Expand Down Expand Up @@ -101,7 +101,7 @@ def matchplay(self, file: Lintable, data: dict[str, Any]) -> list[MatchError]:
),
)
else:
if Version(data.get("version")) != Version(changelog_file_data[-2]):
if Version(data.get("version")) != Version(changelog_file_data[-3]):
results.append(
self.create_matcherror(
message="Version in galaxy.yaml and the latest version in changelog should be same.",
Expand Down

0 comments on commit 759c0f2

Please sign in to comment.