func (sq *SubmitQueue) addWhitelistCommand(root *cobra.Command, config *github_util.Config) { genCommitters := &cobra.Command{ Use: "gencommiters", Short: "Generate the list of people with commit access", RunE: func(_ *cobra.Command, _ []string) error { if err := config.PreExecute(); err != nil { return err } return sq.doGenCommitters(config) }, } root.PersistentFlags().StringVar(&sq.Whitelist, "user-whitelist", "./whitelist.txt", "Path to a whitelist file that contains users to auto-merge. Required.") root.PersistentFlags().StringVar(&sq.Committers, "committers", "./committers.txt", "File in which the list of authorized committers is stored; only used if this list cannot be gotten at run time. (Merged with whitelist; separate so that it can be auto-generated)") root.AddCommand(genCommitters) }