From acaebe8a1a4de948d0723e29f2b0cd7dfaea3c5d Mon Sep 17 00:00:00 2001 From: vilmibm Date: Thu, 8 Dec 2022 14:10:29 -0800 Subject: [PATCH] export is_bot from issue list --- api/export_pr.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/export_pr.go b/api/export_pr.go index 952f849e4..ef463b8a2 100644 --- a/api/export_pr.go +++ b/api/export_pr.go @@ -11,6 +11,18 @@ func (issue *Issue) ExportData(fields []string) map[string]interface{} { for _, f := range fields { switch f { + case "author": + author := map[string]interface{}{ + "is_bot": issue.Author.IsBot(), + } + if issue.Author.IsBot() { + author["login"] = "app/" + issue.Author.Login + } else { + author["login"] = issue.Author.Login + author["name"] = issue.Author.Name + author["id"] = issue.Author.ID + } + data[f] = author case "comments": data[f] = issue.Comments.Nodes case "assignees":