Skip to content

Commit 13a81a2

Browse files
authored
Do no try to use current commit as an LTS compat testing target (#6944)
1 parent 23693e6 commit 13a81a2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: tests/infra/github.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ def __init__(self):
185185
for branch in self.g.ls_remote(REMOTE_URL).split("\n")
186186
if "heads/release" in branch
187187
]
188+
repo = git.Repo(os.getcwd(), search_parent_directories=True)
189+
current_commit = repo.head.commit
190+
self.tags_for_current_commit = [
191+
tag.name for tag in repo.tags if tag.commit == current_commit
192+
]
188193

189194
def has_release_for_tag_name(self, tag_name):
190195
return (
@@ -448,7 +453,10 @@ def install_latest_lts_for_branch(
448453
(
449454
tag
450455
for tag in self.tags
451-
if get_version_from_tag_name(tag) >= Version("6.0.0.dev0")
456+
if (
457+
get_version_from_tag_name(tag) >= Version("6.0.0.dev0")
458+
and tag not in self.g.tags_for_current_commit
459+
)
452460
),
453461
key=get_version_from_tag_name,
454462
reverse=True,

0 commit comments

Comments
 (0)