in libmozdata/phabricator.py [0:0]
def list_comments(self, revision_phid):
"""
List and format existing inline comments for a revision
"""
transactions = self.request(
"transaction.search", objectIdentifier=revision_phid
)
return [
{
"diffID": transaction["fields"]["diff"]["id"],
"filePath": transaction["fields"]["path"],
"lineNumber": transaction["fields"]["line"],
"lineLength": transaction["fields"]["length"],
"content": comment["content"]["raw"],
}
for transaction in transactions["data"]
for comment in transaction["comments"]
if transaction["type"] == "inline"
and transaction["authorPHID"] == self.user["phid"]
]