Skip to content

Commit

Permalink
add a bit log info + fixing obtaining target_arch
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Feb 20, 2024
1 parent 3a2df5a commit bbfb21b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,8 @@ def request_bot_build_issue_comments(repo_name, pr_number):
status_table (dict): dictionary with 'arch', 'date', 'status', 'url' and 'result'
for all the finished builds;
"""
fn = sys._getframe().f_code.co_name

status_table = {'arch': [], 'date': [], 'status': [], 'url': [], 'result': []}
cfg = config.read_config()

Expand All @@ -885,9 +887,12 @@ def request_bot_build_issue_comments(repo_name, pr_number):
first_line = comment['body'].split('\n')[0]
arch_map = get_architecture_targets(cfg)
for arch in arch_map.keys():
target_arch = '/'.join(arch.split('/')[-1])
# drop the first element in arch (which names the OS type) and join the remaining items with '-'
target_arch = '-'.join(arch.split('/')[1:])
if target_arch in first_line:
status_table['arch'].append(target_arch)
else:
log(f"{fn}(): target_arch '{target_arch}' not found in first line '{first_line}'")

# get date, status, url and result from the markdown table
comment_table = comment['body'][comment['body'].find('|'):comment['body'].rfind('|')+1]
Expand Down

0 comments on commit bbfb21b

Please sign in to comment.