update

package
v0.15.10 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomTransport added in v0.1.3

type CustomTransport struct {
	Transport http.RoundTripper
	Token     string
}

func (*CustomTransport) RoundTrip added in v0.1.3

func (t *CustomTransport) RoundTrip(req *http.Request) (*http.Response, error)

type GitHubReleaseOptions

type GitHubReleaseOptions struct {
	GitHubHTTPClient *http2.RLHTTPClient
	Logger           *log.Logger
	PackageConfigs   map[string]*melange.Packages

	// hash is used to create graphql queries, maintain a map of associated configs
	ConfigsByHash map[string]config.Configuration
	ErrorMessages map[string]string
}

func NewGitHubReleaseOptions

func NewGitHubReleaseOptions(packageConfigs map[string]*melange.Packages, ghClient *http2.RLHTTPClient) GitHubReleaseOptions

type MonitorService

type MonitorService struct {
	Client        *http2.RLHTTPClient
	Logger        *log.Logger
	DataMapperURL string
}

type MonitorServiceName

type MonitorServiceName int

type NewVersionResults

type NewVersionResults struct {
	Version                    string
	Commit                     string
	ReplaceExistingIssueNumber int
	ReplaceExistingPRNumber    int
	BumpEpoch                  bool
}

type Options

type Options struct {
	PackageNames           []string
	PackageConfigs         map[string]*melange.Packages
	PullRequestBaseBranch  string
	PullRequestTitle       string
	RepoURI                string
	DefaultBranch          string
	Batch                  bool
	DryRun                 bool
	ReleaseMonitoringQuery bool
	GithubReleaseQuery     bool
	UseGitSign             bool
	CreateIssues           bool
	ReleaseMonitorClient   *http2.RLHTTPClient
	Logger                 *log.Logger
	GitHubHTTPClient       *http2.RLHTTPClient
	ErrorMessages          map[string]string
	IssueLabels            []string
	MaxRetries             int
	PkgPath                string
	PackagesToUpdate       map[string]NewVersionResults
}

func New

func New(ctx context.Context) Options

New initialise including a map of existing wolfios packages

func (*Options) GetLatestVersions

func (o *Options) GetLatestVersions(ctx context.Context, dir string, packageNames []string) (map[string]NewVersionResults, error)

func (*Options) Update

func (o *Options) Update(ctx context.Context) error

type PackageOptions

type PackageOptions struct {
	PackageName           string
	PackageConfig         map[string]*melange.Packages
	PullRequestBaseBranch string
	TargetRepo            string
	Version               string
	Epoch                 string
	Advisories            bool
	DryRun                bool
	UseGitSign            bool
	Logger                *log.Logger
	GithubClient          *github.Client
}

func (*PackageOptions) UpdatePackageCmd

func (o *PackageOptions) UpdatePackageCmd(ctx context.Context) error

type QueryReleaseData

type QueryReleaseData struct {
	RepoList []RepoQuery
}

type QueryReleasesResponse

type QueryReleasesResponse struct {
	Data map[string]Releases `json:"data"`
}

type QueryTagsData

type QueryTagsData struct {
	RepoList []RepoQuery
}

type QueryTagsResponse

type QueryTagsResponse struct {
	Data map[string]Repo `json:"data"`
}

type ReleaseMonitorVersions

type ReleaseMonitorVersions struct {
	LatestVersion  string   `json:"latest_version"`
	StableVersions []string `json:"stable_versions"`
}

type Releases

type Releases struct {
	RepositoryCount int `json:"repositoryCount"`
	Owner           struct {
		Login string `json:"login"`
	} `json:"owner"`
	Name          string `json:"name"`
	NameWithOwner string `json:"nameWithOwner"`
	Releases      struct {
		TotalCount int `json:"totalCount"`
		Nodes      []struct {
			Tag struct {
				Name   string `json:"name"`
				Target struct {
					CommitURL string `json:"commitUrl"`
				} `json:"target"`
			} `json:"tag"`
			Name         string `json:"name"`
			IsPrerelease bool   `json:"isPrerelease"`
			IsDraft      bool   `json:"isDraft"`
			IsLatest     bool   `json:"isLatest"`
		} `json:"nodes"`
	} `json:"releases"`
}

type Repo

type Repo struct {
	NameWithOwner string `json:"nameWithOwner"`
	Refs          struct {
		TotalCount int `json:"totalCount"`
		Nodes      []struct {
			TagName string `json:"name"`
			Target  struct {
				CommitURL string `json:"commitUrl"`
			} `json:"target"`
		} `json:"nodes"`
	} `json:"refs"`
}

type RepoInfo

type RepoInfo struct {
	Owner       string
	Name        string
	Filter      string
	PackageName string
}

type RepoQuery

type RepoQuery struct {
	Owner       string
	Name        string
	Filter      string
	PackageName string
}

type ResponseError

type ResponseError struct {
	Errors []struct {
		Type       string   `json:"type"`
		Path       []string `json:"path"`
		Extensions struct {
			SamlFailure bool `json:"saml_failure"`
		} `json:"extensions"`
		Locations []struct {
			Line   int `json:"line"`
			Column int `json:"column"`
		} `json:"locations"`
		Message string `json:"message"`
	} `json:"errors"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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