diff --git a/backend/plugins/github/tasks/pr_convertor.go b/backend/plugins/github/tasks/pr_convertor.go index eeb1caa5de5..22365b79dce 100644 --- a/backend/plugins/github/tasks/pr_convertor.go +++ b/backend/plugins/github/tasks/pr_convertor.go @@ -88,7 +88,6 @@ func ConvertPullRequests(taskCtx plugin.SubTaskContext) errors.Error { OriginalStatus: pr.State, Title: pr.Title, Url: pr.Url, - AuthorId: accountIdGen.Generate(data.Options.ConnectionId, pr.AuthorId), AuthorName: pr.AuthorName, Description: pr.Body, CreatedDate: pr.GithubCreatedAt, @@ -115,6 +114,9 @@ func ConvertPullRequests(taskCtx plugin.SubTaskContext) errors.Error { } else { domainPr.Status = code.CLOSED } + if pr.AuthorId != 0 { + domainPr.AuthorId = accountIdGen.Generate(data.Options.ConnectionId, pr.AuthorId) + } return []interface{}{ domainPr, }, nil