Skip to content

Commit

Permalink
Add workflow and job id
Browse files Browse the repository at this point in the history
  • Loading branch information
cscollett committed Aug 30, 2024
1 parent d94014c commit 04b9fce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def analyze_logs(log_content):


# Function to summarize the issues based on the jobs
def summarize_issues(jobs):
def summarize_issues(jobs, workflow_id):
summary = {}
for job in jobs:
job_name = job['name']
Expand All @@ -128,6 +128,8 @@ def summarize_issues(jobs):
print(f"Logs found for job: {job_name}, analyzing...") # Debugging output
os_id, version_id, version_codename, full_version, python_version, issues_found = analyze_logs(logs)
summary[job_name] = {
"workflow_id": workflow_id, # Add workflow_id to the summary
"job_id": job_id, # Add job_id to the summary
"status": job_status,
"os_id": os_id,
"version_id": version_id,
Expand All @@ -140,6 +142,8 @@ def summarize_issues(jobs):
else:
print(f"No logs found for job: {job_name}, setting default values.") # Debugging output
summary[job_name] = {
"workflow_id": workflow_id, # Add workflow_id to the summary
"job_id": job_id, # Add job_id to the summary
"status": job_status,
"os_id": None,
"version_id": None,
Expand All @@ -152,6 +156,7 @@ def summarize_issues(jobs):
return summary



# Function to generate the simplified summary report
def generate_simplified_summary_report(summary):
report_lines = ["Test Summary Report:\n"]
Expand Down

0 comments on commit 04b9fce

Please sign in to comment.