Skip to content

Commit

Permalink
Move deployedProjectID before github access check
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHegde committed Jun 27, 2024
1 parent 93f85c5 commit 09f0e31
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions cli/pkg/local/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ func (s *Server) DeployValidation(ctx context.Context, r *connect.Request[localv
return nil, err
}

rc, err := dotrillcloud.GetAll(s.app.ProjectPath, s.app.adminURL)
if err != nil {
return nil, err
}
var deployedProjectID string
if rc != nil {
deployedProjectID = rc.ProjectID
}

userStatus, err := c.GetGithubUserStatus(ctx, &adminv1.GetGithubUserStatusRequest{})
if err != nil {
return nil, err
Expand All @@ -161,18 +170,10 @@ func (s *Server) DeployValidation(ctx context.Context, r *connect.Request[localv
RillOrgExistsAsGithubUserName: false,
RillUserOrgs: nil,
LocalProjectName: localProjectName,
DeployedProjectId: deployedProjectID,
}), nil
}

rc, err := dotrillcloud.GetAll(s.app.ProjectPath, s.app.adminURL)
if err != nil {
return nil, err
}
var deployedProjectID string
if rc != nil {
deployedProjectID = rc.ProjectID
}

isGithubRepo := true
githubRemoteFound := true
repoAccess := false
Expand Down

0 comments on commit 09f0e31

Please sign in to comment.