Documentation ¶
Overview ¶
Package v1alpha1 stores definitions and methods to handle code repositories definitions and methods
Index ¶
Constants ¶
const ReasonHasConflicts = "HasConflicts"
ReasonHasConflicts reason for git status has conflicts
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "coderepository.pkg.katanomi.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( // GitCreateCommitGVK is the GroupVersionKind for GitCreateCommit GitCreateCommitGVK = GroupVersion.WithKind("GitCreateCommit") )
Functions ¶
This section is empty.
Types ¶
type CreateCommitAction ¶
type CreateCommitAction struct { Action string `json:"action,omitempty"` FilePath string `json:"filePath"` PreviousPath string `json:"previousPath,omitempty"` Encoding string `json:"encoding,omitempty"` Content string `json:"content,omitempty"` }
CreateCommitAction action for create commit
type CreateGitCommitOption ¶
type CreateGitCommitOption struct { metav1alpha1.GitRepo GitCreateCommit }
CreateGitCommitOption option for create commit
type GitCreateCommit ¶
type GitCreateCommit struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GitCreateCommitSpec `json:"spec"` }
GitCreateCommit object for plugins
type GitCreateCommitSpec ¶
type GitCreateCommitSpec struct { // Name of the branch to commit into. // To create a new branch, also provide either startBranch or startSHA or startTag. Branch string `json:"branch"` // Commit message Message string `json:"message"` // An array of action to commit as a batch. Actions []CreateCommitAction `json:"actions"` // Author commit author Author *metav1alpha1.GitUserBaseInfo `json:"author,omitempty"` // StartBranch start branch StartBranch string `json:"startBranch,omitempty"` // StartSHA start sha StartSHA string `json:"startSHA,omitempty"` // StartTag start tag StartTag string `json:"startTag,omitempty"` // Create a pull request after creating the commit. CreatePullRequest bool `json:"createPullRequest"` // Delete the source branch after merging the pull request. RemoveSourceBranch bool `json:"removeSourceBranch"` }
GitCreateCommitSpec spec for GitCreateCommit
type GitRepositoryRevisionSpec ¶ added in v0.11.0
type GitRepositoryRevisionSpec struct { // The URL of the git repository URL string `json:"url"` // The revision of the git repository Revision string `json:"revision"` // The commit of the git repository Commit string `json:"commit"` }
GitRepositoryRevisionSpec defines the desired state of GitRepositoryRevisionSpec
type GitRepositoryStatus ¶ added in v0.11.0
type GitRepositoryStatus struct { // Name of the GitRepository Name string `json:"name"` // BaseGitStatus stores the common status fields of GitRepository // +optional *v1alpha1.BaseGitStatus `json:",inline,omitempty"` // Condition stores `GitStatusReady` condition of the GitRepository // +optional Condition *apis.Condition `json:"condition,omitempty"` }
GitRepositoryStatus defines the observed state of GitRepository +k8s:deepcopy-gen=true
func (*GitRepositoryStatus) DeepCopy ¶ added in v0.11.0
func (in *GitRepositoryStatus) DeepCopy() *GitRepositoryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryStatus.
func (*GitRepositoryStatus) DeepCopyInto ¶ added in v0.11.0
func (in *GitRepositoryStatus) DeepCopyInto(out *GitRepositoryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitRepositoryStatus) GetValWithKey ¶ added in v0.11.0
func (git *GitRepositoryStatus) GetValWithKey(ctx context.Context, path *field.Path) (stringVals map[string]string, arrayVals map[string][]string, objectVals map[string]map[string]string)
GetValWithKey get variables with values for variable substitution using a cascading method from each different object using path as a path builder from top to bottom. It returns a set of string variables, array variables and object variables like the following:
| Variable | Example value | |------------------------|---------------------------------------------| | <path>.<name> | {"url":"","revision:"","commit":""} | | <path>.<name>.revision | "refs/heads/main" | | <path>.<name>.commit | "e683afce4427afc58ee8af4c53c030854616aff2" | | <path>.<name>.url | "e683afce4427afc58ee8af4c53c030854616aff2" | etc..
type GitRepositoryStatuses ¶ added in v0.11.0
type GitRepositoryStatuses []GitRepositoryStatus
GitRepositoryStatuses list of all git parameter status named by paramName +listType=atomic
type NamedGitRepositoryRevision ¶ added in v0.11.0
type NamedGitRepositoryRevision struct { // The name of the GitRepositoryRevisionSpec Name string `json:"name"` // GitRepositoryRevision is the specification of the desired GitRepositoryRevisionSpec state GitRepositoryRevisionSpec `json:",inline"` }
NamedGitRepositoryRevision is a named GitRepositoryRevisionSpec
type NamedGitRepositoryRevisions ¶ added in v0.11.0
type NamedGitRepositoryRevisions []NamedGitRepositoryRevision
NamedGitRepositoryRevisions is a list of named GitRepositoryRevisions TODO: move contract related types to core package in the future