Format files
All checks were successful
Tests / Declarative: Post Actions passed: 14
CI-Multi/pipeline/pr-main This commit looks good

This commit is contained in:
2026-02-22 12:20:30 +01:00
parent f9185e0f21
commit bd769b0eb0
5 changed files with 29 additions and 11 deletions

View File

@@ -32,11 +32,13 @@ def normalize_build(build: Dict) -> Dict:
for cs in changes:
for item in cs.get("items", []):
commits.append({
"commit": item.get("commitId", "")[:7],
"message": item.get("msg", ""),
"author": item.get("author", {}).get("fullName", "unknown"),
})
commits.append(
{
"commit": item.get("commitId", "")[:7],
"message": item.get("msg", ""),
"author": item.get("author", {}).get("fullName", "unknown"),
}
)
return {
"number": build.get("number"),
@@ -65,12 +67,13 @@ def fetch_builds(limit: int = 5) -> List[Dict]:
"changesets[items[commitId,msg,author[fullName]]]]"
)
resp = requests.get(url, headers = _auth_header(), timeout=5)
resp = requests.get(url, headers=_auth_header(), timeout=5)
resp.raise_for_status()
builds = resp.json().get("builds", [])
return builds[:limit]
def build_history() -> Dict:
"""Return Jenkins build history data."""
builds = fetch_builds()