1

我正在使用 github3.py 库在来自 csv 文件的列字段的拉取请求中创建评论。我想将图像与列的输出一起添加到评论中,但我找不到这样做的方法。我已经阅读了使用 PIL 打开图像,但.create_comment()只需要一个字符串值。任何提示或指示?

failed_validation_lst=[]
        with open(reportOut, 'r') as f:
            reader = csv.reader(f, skipinitialspace=True)
            headers = next(reader)
            for row_number,row in enumerate(reader,2):
                for column, val in enumerate(row):
                    if val == 'True':
                        failed_validation_lst.append(headers[column])
                failed_validation_string = '; '.join(failed_validation_lst)
                repo.issue(row[0]).create_comment(failed_validation_string)
4

1 回答 1

2

GitHub API 不支持此功能。评论拉取请求与评论问题是一回事。您需要将图像托管在其他地方并使用图像标记降价来显示它,例如,

![image description](http://image-hosting.com/path/to/img.jpg)
于 2016-09-27T15:31:14.700 回答