scms

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitStatusProvider

type CommitStatusProvider interface {
	// Set sets the commit status for a given commit SHA in the specified repository.
	Set(ctx context.Context, commitStatus *v1alpha1.CommitStatus) (*v1alpha1.CommitStatus, error)
}

CommitStatusProvider defines the interface for managing commit statuses in a source control management system.

type GitOperationsProvider

type GitOperationsProvider interface {
	// GetGitHttpsRepoUrl constructs the HTTPS URL for a Git repository based on the provided GitRepository object.
	GetGitHttpsRepoUrl(gitRepo v1alpha1.GitRepository) string
	// GetToken retrieves the authentication token.
	GetToken(ctx context.Context) (string, error)
	// GetUser returns the user name for authentication.
	GetUser(ctx context.Context) (string, error)
}

GitOperationsProvider defines the interface for performing Git operations.

type PullRequestProvider

type PullRequestProvider interface {
	// Create creates a new pull request with the specified title, head, base, and description.
	Create(ctx context.Context, title, head, base, description string, pullRequest v1alpha1.PullRequest) (string, error)
	// Close closes an existing pull request.
	Close(ctx context.Context, pullRequest v1alpha1.PullRequest) error
	// Update updates an existing pull request with the specified title, description, and pull request details.
	Update(ctx context.Context, title, description string, pullRequest v1alpha1.PullRequest) error
	// Merge merges an existing pull request with the specified commit message.
	Merge(ctx context.Context, pullRequest v1alpha1.PullRequest) error
	// FindOpen checks if a pull request is open and returns its status.
	FindOpen(ctx context.Context, pullRequest v1alpha1.PullRequest) (bool, v1alpha1.PullRequestCommonStatus, error)
	// GetUrl retrieves the URL of the pull request.
	GetUrl(ctx context.Context, pullRequest v1alpha1.PullRequest) (string, error)
}

PullRequestProvider defines the interface for managing pull requests in a source control management system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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