Add godoc comments to exported symbols in pkg/cmd/repo

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kynan Ware 2026-03-04 15:53:48 -07:00
parent 8f7e98c6f6
commit 34d1fb3e63
40 changed files with 106 additions and 0 deletions

View file

@ -49,6 +49,7 @@ const (
optionWikis = "Wikis"
)
// EditOptions holds the options for the edit command.
type EditOptions struct {
HTTPClient *http.Client
Repository ghrepo.Interface
@ -65,6 +66,7 @@ type EditOptions struct {
topicsCache []string
}
// EditRepositoryInput contains the fields that can be edited on a repository.
type EditRepositoryInput struct {
enableAdvancedSecurity *bool
enableSecretScanning *bool
@ -89,6 +91,7 @@ type EditRepositoryInput struct {
Visibility *string `json:"visibility,omitempty"`
}
// NewCmdEdit creates a new command to edit repository settings.
func NewCmdEdit(f *cmdutil.Factory, runF func(options *EditOptions) error) *cobra.Command {
opts := &EditOptions{
IO: f.IOStreams,
@ -603,12 +606,14 @@ func hasSecurityEdits(edits EditRepositoryInput) bool {
return edits.enableAdvancedSecurity != nil || edits.enableSecretScanning != nil || edits.enableSecretScanningPushProtection != nil
}
// SecurityAndAnalysisInput holds settings for repository security and analysis features.
type SecurityAndAnalysisInput struct {
EnableAdvancedSecurity *SecurityAndAnalysisStatus `json:"advanced_security,omitempty"`
EnableSecretScanning *SecurityAndAnalysisStatus `json:"secret_scanning,omitempty"`
EnableSecretScanningPushProtection *SecurityAndAnalysisStatus `json:"secret_scanning_push_protection,omitempty"`
}
// SecurityAndAnalysisStatus holds the status of a single security and analysis feature.
type SecurityAndAnalysisStatus struct {
Status *string `json:"status,omitempty"`
}