Skip to content

Commit

Permalink
fix: add field username
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Jun 21, 2022
1 parent b5fa993 commit e0a430e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/create_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type CreateTaskResponse struct {
TaskInfo string `json:"task_info"`
TotalContributors int `json:"total_contributors"`
ProjectId string `json:"project_id"`
Username string `json:"username"`
}

func CreateTask(req *CreateTaskRequest) (*CreateTaskResponse, error) {
Expand Down
1 change: 1 addition & 0 deletions inspector/task_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func createTask(ctx context.Context) error {
c.TaskId = res.TaskInfo
c.TotalContributors = res.TotalContributors
c.ProjectId = res.ProjectId
c.Username = res.Username
logger.Info.Println("task created, id:", res.TaskInfo)
return nil
} else {
Expand Down
2 changes: 2 additions & 0 deletions model/idea_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func GenerateIdeaErrorOutput(e error) string {

type PluginOutput struct {
ProjectName string `json:"project_name"`
Username string `json:"username"`
ErrCode IdeaErrCode `json:"err_code"`
IssuesCount int `json:"issues_count,omitempty"`
Comps []PluginComp `json:"comps,omitempty"`
Expand Down Expand Up @@ -93,6 +94,7 @@ func GenerateIdeaOutput(c context.Context) string {
}
p := &PluginOutput{
ProjectName: ctx.ProjectName,
Username: ctx.Username,
ErrCode: IdeaSucceed,
IssuesCount: i.IssuesCompsCount,
Comps: []PluginComp{},
Expand Down
1 change: 1 addition & 0 deletions model/scan_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type ScanTask struct {
Kind TaskKind
ProjectType ProjectType
ProjectId string
Username string
StartTime time.Time
GitInfo *GitInfo
TaskType TaskType
Expand Down

0 comments on commit e0a430e

Please sign in to comment.