Skip to content

Commit 9e0c2c1

Browse files
authored
Merge pull request ActiveState#3364 from ActiveState/mitchell/dx-2912
Add authentication tip for buildplanner fetch commit errors if the user is not authenticated.
2 parents 80f88d9 + ee5d13a commit 9e0c2c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/platform/model/buildplanner/build.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ func (b *BuildPlanner) FetchCommit(commitID strfmt.UUID, owner, project string,
5454
resp := &response.ProjectCommitResponse{}
5555
err := b.client.Run(request.ProjectCommit(commitID.String(), owner, project, target), resp)
5656
if err != nil {
57-
return nil, processBuildPlannerError(err, "failed to fetch commit")
57+
err = processBuildPlannerError(err, "failed to fetch commit")
58+
if !b.auth.Authenticated() {
59+
err = errs.AddTips(err, locale.T("tip_private_project_auth"))
60+
}
61+
return nil, err
5862
}
5963

6064
// The BuildPlanner will return a build plan with a status of

0 commit comments

Comments
 (0)