in tools/plugins.py [0:0]
def _get_branch_results(self, pluginId, pluginName, builds):
pluginBranches = self._get_branches(pluginId)
branches = list()
for branch in BRANCHES:
string = fr"^plugin-{pluginName}-[a-z|-]*{branch}$"
pattern = re.compile(string)
result = BuildResult.UNAVAILABLE
for job in builds["jobs"]:
if pattern.match(job["name"]):
result = (
BuildResult.SUCCESSFUL
if job["lastBuild"] and job["lastBuild"]["result"] == "SUCCESS"
else BuildResult.FAILED
)
branches.append(Branch(branch, result, branch in pluginBranches))
break
if result == BuildResult.UNAVAILABLE:
branches.append(Branch.missing(branch))
return branches