MCPcopy
hub / github.com/commaai/openpilot / comment_images_on_pr

Method comment_images_on_pr

tools/lib/github_utils.py:102–113  ·  view source on GitHub ↗
(self, title, commenter, pr_branch, bucket, images)

Source from the content-addressed store, hash-verified

100
101 # upload files to github and comment them on the pr
102 def comment_images_on_pr(self, title, commenter, pr_branch, bucket, images):
103 self.upload_files(bucket, images)
104 table = [f'<details><summary>{title}</summary><table>']
105 for i,f in enumerate(images):
106 if not (i % 2):
107 table.append('<tr>')
108 table.append(f'<td><img src=\\"https://raw.githubusercontent.com/{self.OWNER}/{self.DATA_REPO}/{bucket}/{f[0]}\\"></td>')
109 if (i % 2):
110 table.append('</tr>')
111 table.append('</table></details>')
112 table = ''.join(table)
113 self.comment_on_pr(table, commenter, pr_branch)

Callers

nothing calls this directly

Calls 4

upload_filesMethod · 0.95
comment_on_prMethod · 0.95
appendMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected