Skip to content

Commit

Permalink
fix: skip interactive steps in generate codeowners with --tty-disable…
Browse files Browse the repository at this point in the history
… flag
  • Loading branch information
nickytonline committed Sep 6, 2024
1 parent 9ce759a commit ce31d3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/generate/codeowners/codeowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ func run(opts *Options, cmd *cobra.Command) error {
opts.logger.V(logging.LogInfo).Style(0, colors.FgGreen).Infof("Finished generating file: %s\n", outputPath)
opts.telemetry.CaptureCodeownersGenerate()

// ignore the interactive prompts for CI/CD environments
if opts.tty {
return nil
}

// 1. Ask if they want to add users to a list
var input string
fmt.Print("Do you want to add these codeowners to an OpenSauced Contributor Insight? (y/n): ")
Expand Down

0 comments on commit ce31d3f

Please sign in to comment.