Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion eessi_bot_event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ def handle_bot_command_status(self, event_info, bot_command):
repo_name = event_info['raw_request_body']['repository']['full_name']
pr_number = event_info['raw_request_body']['issue']['number']
status_table = request_bot_build_issue_comments(repo_name, pr_number)
self.log(f"Retrieved status table from issue comments: {status_table}")

if 'last_build' in bot_command.general_args:
# If the bot command is something like 'bot:status =last_build', then only retain the last build for each
Expand Down Expand Up @@ -625,7 +626,17 @@ def handle_bot_command_status(self, event_info, bot_command):
'on arch': [], 'for arch': [], 'for repo': [], 'date': [], 'status': [], 'url': [], 'result': []
}
for x in range(0, len(sorted_table['date'])):
if sorted_table['for arch'][x] not in status_table_last['for arch']:
# Check if the current 'for arch' AND 'for repo' are already in the status_table_last. If not, add it
already_present = False
for y in range(0, len(status_table_last['for arch'])):
if (
sorted_table['for arch'][x] == status_table_last['for arch'][y]
and sorted_table['for repo'][x] == status_table_last['for repo'][y]
):
already_present = True
# One match is enough, we don't append in this case, no need to look further
break
if not already_present:
self.log(f"arch: {sorted_table['for arch'][x]} not yet in status_table_last")
for key in status_table_last:
self.log(f"Adding to '{key}' and the value {sorted_table[key][x]}")
Expand Down