cmd

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cmd provides a command-line interface for changing GHAS settings for a given organization.

Package cmd provides a command-line interface for changing GHAS settings for a given organization.

Package cmd provides a command-line interface for changing GHAS settings for a given organization.

Package cmd provides a command-line interface for changing GHAS settings for a given organization.

Package cmd provides a command-line interface for changing GHAS settings for a given organization.

Copyright © 2023 NAME HERE <EMAIL ADDRESS>

Index

Constants

View Source
const VERSION = "1.1.0"

Variables

View Source
var MaxRetries = 5

Functions

func CheckAndMigrateSecretScanning

func CheckAndMigrateSecretScanning(repository string, sourceOrg string, targetOrg string, sourceToken string, targetToken string) error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ProcessRepoMigration

func ProcessRepoMigration(repository github.Repository, sourceOrg string, targetOrg string, sourceToken string, targetToken string, maxRetries int) error

func ReactivateTargetWorkflows

func ReactivateTargetWorkflows(repository string, sourceOrg string, targetOrg string, sourceToken string, targetToken string) error

Types

type MigrationResult added in v1.0.0

type MigrationResult struct {
	Timestamp time.Time `json:"timestamp"`
	SourceOrg string    `json:"sourceOrg"`
	TargetOrg string    `json:"targetOrg"`
	Migrated  []Repo    `json:"migrated"`
	Failed    []Repo    `json:"failed"`
}

type Repo added in v1.0.0

type Repo struct {
	Name           string `json:"name"`
	ID             int64  `json:"id"`
	Archived       bool   `json:"archived"`
	CodeScanning   string `json:"codeScanning" default:"disabled"`
	SecretScanning string `json:"secretScanning" default:"disabled"`
	PushProtection string `json:"pushProtection" default:"disabled"`
}

type WorkerError added in v1.2.1

type WorkerError struct {
	Err  error
	Repo github.Repository
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL