Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send run summary to Spaces even without --summarize flag #4785

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions cli/internal/runsummary/run_summary.go
Expand Up @@ -153,11 +153,15 @@ func (rsm *Meta) Close(ctx context.Context, exitCode int, workspaceInfos workspa

rsm.printExecutionSummary()

// If we're not supposed to save or if there's no spaceID
if !rsm.shouldSave || rsm.spaceID == "" {
// If we don't have a spaceID, we can exit now
if rsm.spaceID == "" {
return nil
}

return rsm.sendToSpace(ctx)
}

func (rsm *Meta) sendToSpace(ctx context.Context) error {
if !rsm.apiClient.IsLinked() {
rsm.ui.Warn("Failed to post to space because repo is not linked to a Space. Run `turbo link` first.")
return nil
Expand Down