Skip to content

Commit

Permalink
feat: display notice when use default task id
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Dec 27, 2022
1 parent 3075dea commit 2652cfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/murphy/internal/cv/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ func DisplayAlertMessage(ctx context.Context, msg string) {
}
ui.Use(ctx).Display(ui.MsgNotice, msg)
}

func DisplayUseDefaultTaskId(ctx context.Context) {
ui.Use(ctx).Display(ui.MsgNotice, "未指定 --task-id,检测结果将会关联至“CLI默认项目”中")
}
1 change: 1 addition & 0 deletions cmd/murphy/internal/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func scan(ctx context.Context, dir string, accessType model.AccessType) (*model.
cv.DisplayAlertMessage(ctx, createTaskResp.AlertMessage)
cv.DisplaySubtaskCreated(ctx, createTaskResp.ProjectsName, createTaskResp.TaskName, createTaskResp.TaskID, createSubtask.SubtaskName, createTaskResp.SubtaskID)
if shouldWriteConfig {
cv.DisplayUseDefaultTaskId(ctx)
logger.Infof("creating repo config...")
e = config.WriteRepoConfig(ctx, dir, accessType, config.RepoConfig{TaskId: createTaskResp.TaskID})
if e != nil {
Expand Down

0 comments on commit 2652cfd

Please sign in to comment.