Skip to content

Commit

Permalink
bot: report: add project name
Browse files Browse the repository at this point in the history
This commit implements project name field into report email body.
  • Loading branch information
piotrnarajowski committed Aug 16, 2024
1 parent c6f8214 commit 9b78809
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autopts/bot/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ def start(self, args=None):
report_data['start_time_stamp'] = datetime.datetime.fromtimestamp(
bot_state['start_time']).strftime("%Y_%m_%d_%H_%M_%S")

report_data['project_name'] = self.autopts_project_name
report_data['status_count'] = stats.get_status_count()
report_data['tc_results'] = stats.get_results()
report_data['descriptions'] = stats.get_descriptions()
Expand Down Expand Up @@ -683,7 +684,8 @@ def send_email(self, report_data):

descriptions = report_data['descriptions']

mail_ctx = {'repos_info': report_data['repo_status'],
mail_ctx = {'project_name': report_data['project_name'],
'repos_info': report_data['repo_status'],
'summary': [mail.status_dict2summary_html(report_data['status_count'])],
'log_url': [],
'board': self.bot_config['auto_pts']['board'],
Expand Down Expand Up @@ -747,7 +749,7 @@ def compose_mail(self, mail_ctx):
<h1>Bluetooth test session - {ww_dd_str} </h1>
{additional_info}
<h2>1. IUT Setup</h2>
<p><b> Type:</b> Zephyr <br>
<p><b> Type:</b> {project_name} <br>
<b> Board:</b> {board} <br>
<b> Source:</b> {repos_info} </p>
<h2>2. PTS Setup</h2>
Expand Down

0 comments on commit 9b78809

Please sign in to comment.