diff --git a/scripts/release-parser.py b/scripts/release-parser.py
index a38824f..9e5bc6a 100755
--- a/scripts/release-parser.py
+++ b/scripts/release-parser.py
@@ -59,15 +59,16 @@ def get_bitbake_mapping(yocto_tag: str) -> str:
     return branches[0].strip().replace("origin/", "")

 def get_git_tags():
-    tagmap = {}
-    for t in repo.tags:
-        tagmap.setdefault(repo.commit(t), []).append(t)
-
     def convert_name(tag):
-        tags = tagmap[tag.commit]
-        for t in tags:
-            if "yocto" not in t.name and ".rc" not in t.name:
-                return "".join(filter(str.isalpha, t.name)).capitalize()
+        branches = repo.git.branch(
+            "--remotes",
+            "--sort=creatordate",
+            "--contains", tag.commit.hexsha,
+        ).splitlines()
+        for b in branches:
+            b = b.strip().replace("origin/", "").replace("* ", "")
+            if b.isalpha() and b not in ("master", "main"):
+                return b.capitalize()
         return "BranchMissing"

     tags = list(filter(lambda e: "yocto" in e.name, repo.tags))
