diff --git a/reporters/swatbot.py b/reporters/swatbot.py
index 5e434d5d04a4..6e3827329033 100644
--- a/reporters/swatbot.py
+++ b/reporters/swatbot.py
@@ -49,6 +49,24 @@ class SwatBotURI(object):
             return self.client.get(query, timeout=self.TIMEOUT, headers=self.headers, allow_redirects=False)
         return req
 
+    def get_build_branch(self, build):
+        """Extract branch name from build properties.
+
+        Args:
+            build: Build dictionary containing properties
+
+        Returns:
+            Branch name if found, None otherwise
+        """
+        repos = ['poky', 'oecore', 'yocto-docs']
+        for repo in repos:
+            branch = build['properties'].get(f'branch_{repo}')
+            if branch:
+                return branch[0]
+        branches = [p for p in build['properties'] if p.startswith('branch')]
+        log.err("Failed to get corresponding branch, possible values: %s", branches)
+        return None
+
     def find_build_collection(self, build):
         dbid = None
 
@@ -77,7 +95,7 @@ class SwatBotURI(object):
                     'attributes': {
                         "buildid": collection_build_id,
                         "targetname": build['builder']['name'],
-                        "branch": build['properties']['branch_poky'][0],
+                        "branch": self.get_build_branch(build)
                     }
                 }
             }
