Skip to content

Commit

Permalink
Name some values for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 8, 2020
1 parent df14492 commit cedf94f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions command/title_body_survey.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ func titleBodySurvey(cmd *cobra.Command, issueState *issueMetadataState, apiClie
issueState.Body = templateContents
}

confirmA, err := confirmSubmission(!issueState.HasMetadata(), true)
allowPreview := !issueState.HasMetadata()
allowMetadata := true
confirmA, err := confirmSubmission(allowPreview, allowMetadata)
if err != nil {
return fmt.Errorf("unable to confirm: %w", err)
}
Expand Down Expand Up @@ -319,7 +321,9 @@ func titleBodySurvey(cmd *cobra.Command, issueState *issueMetadataState, apiClie
issueState.Milestone = ""
}

confirmA, err = confirmSubmission(!issueState.HasMetadata(), false)
allowPreview := !issueState.HasMetadata()
allowMetadata := false
confirmA, err = confirmSubmission(allowPreview, allowMetadata)
if err != nil {
return fmt.Errorf("unable to confirm: %w", err)
}
Expand Down

0 comments on commit cedf94f

Please sign in to comment.