Documentation
¶
Overview ¶
Package repository interacts with git and github
Index ¶
- Variables
- func CreateBackportIssues(ctx context.Context, client *github.Client, origIssue *github.Issue, ...) (*github.Issue, error)
- func CreateRelease(ctx context.Context, client *github.Client, cro *CreateReleaseOpts) (*github.RepositoryRelease, error)
- func CreateReleaseIssue(ctx context.Context, client *github.Client, cri *CreateReleaseIssueOpts) (*github.Issue, error)
- func DiffLocalToRemote(r *git.Repository, remote, releaseBranch string) error
- func LatestTag(ctx context.Context, client *github.Client, owner, repo string) (*github.RepositoryTag, error)
- func ListReleases(ctx context.Context, client *github.Client, owner, repo string) ([]*github.RepositoryRelease, error)
- func ListTags(ctx context.Context, client *github.Client, owner, repo string) ([]*github.RepositoryTag, error)
- func NewGithub(ctx context.Context, token string) *github.Client
- func PerformBackport(ctx context.Context, client *github.Client, pbo *PerformBackportOpts) ([]*github.Issue, error)
- func PushRemoteBranch(r *git.Repository, remote, user, token string, debug bool) error
- func RefCommitSHA(ctx context.Context, ghClient *github.Client, owner, repo, ref string) (string, error)
- func RetrieveOriginalIssue(ctx context.Context, client *github.Client, owner, repo string, issueID uint) (*github.Issue, error)
- func SplitOwnerRepo(ownerRepo string) (string, string, error)
- func UpstreamRemote(r *git.Repository, remoteURL string) (string, error)
- type ChangeLog
- type CreateReleaseIssueOpts
- type CreateReleaseOpts
- type Issue
- type PerformBackportOpts
- type TokenSource
Constants ¶
This section is empty.
Variables ¶
var RKE2Adjacent = []string{
"rancher/rke2-upgrade",
"rancher/rke2-packaging",
"rancher/system-agent-installer-rke2",
"rancher/system-upgrade-controller",
}
var RKE2HardenedImages = []string{
"rancher/image-build-base",
"rancher/image-build-calico",
"rancher/image-build-cni-plugins",
"rancher/image-build-containerd",
"rancher/image-build-coredns",
"rancher/image-build-crictl",
"rancher/image-build-dns-nodecache",
"rancher/image-build-etcd",
"rancher/image-build-flannel",
"rancher/image-build-ib-sriov-cni",
"rancher/image-build-k8s-metrics-server",
"rancher/image-build-kubernetes",
"rancher/image-build-multus",
"rancher/image-build-rke2-cloud-provider",
"rancher/image-build-runc",
"rancher/image-build-sriov-cni",
"rancher/image-build-sriov-network-device-plugin",
"rancher/image-build-sriov-network-resources-injector",
"rancher/image-build-sriov-operator",
"rancher/image-build-whereabouts",
"rancher/ingress-nginx",
}
var RKE2MirroredImages = []string{
"mirrored-ingress-nginx-kube-webhook-certgen",
"mirrored-cilium-cilium",
"mirrored-cilium-operator-aws",
"mirrored-cilium-operator-azure",
"mirrored-cilium-operator-generic",
"mirrored-calico-operator",
"mirrored-calico-ctl",
"mirrored-calico-kube-controllers",
"mirrored-calico-typha",
"mirrored-calico-node",
"mirrored-calico-pod2daemon-flexvol",
"mirrored-calico-cni",
"mirrored-calico-apiserver",
"mirrored-cloud-provider-vsphere-cpi-release-manager",
"mirrored-cloud-provider-vsphere-csi-release-driver",
"mirrored-cloud-provider-vsphere-csi-release-syncer",
"mirrored-sig-storage-csi-node-driver-registrar",
"mirrored-sig-storage-csi-resizer",
"mirrored-sig-storage-livenessprobe",
"mirrored-sig-storage-csi-attacher",
"mirrored-sig-storage-csi-provisioner",
}
Functions ¶
func CreateBackportIssues ¶
func CreateRelease ¶ added in v0.11.0
func CreateRelease(ctx context.Context, client *github.Client, cro *CreateReleaseOpts) (*github.RepositoryRelease, error)
func CreateReleaseIssue ¶ added in v0.11.0
func DiffLocalToRemote ¶ added in v0.41.1
func DiffLocalToRemote(r *git.Repository, remote, releaseBranch string) error
DiffLocalToRemote will get the commits from the local branch and from the target remote branch, will return the commits that are present in the local branch but not in the remote branch.
func ListReleases ¶ added in v0.21.0
func NewGithub ¶
NewGithub creates a value of type github.Client pointer with the given context and Github token.
func PerformBackport ¶ added in v0.11.0
func PerformBackport(ctx context.Context, client *github.Client, pbo *PerformBackportOpts) ([]*github.Issue, error)
PerformBackport creates backport issues, performs a cherry-pick of the given commit if it exists.
func PushRemoteBranch ¶ added in v0.41.1
func PushRemoteBranch(r *git.Repository, remote, user, token string, debug bool) error
PushRemoteBranch will push the local branch to the remote repository
func RefCommitSHA ¶ added in v0.66.0
func RetrieveOriginalIssue ¶
func SplitOwnerRepo ¶ added in v0.25.1
func UpstreamRemote ¶ added in v0.41.1
func UpstreamRemote(r *git.Repository, remoteURL string) (string, error)
UpstreamRemote will return the remote name for a given configured remote URL
Types ¶
type ChangeLog ¶
ChangeLog contains the found changes for the given release, to be used in to populate the template.
type CreateReleaseIssueOpts ¶ added in v0.11.0
type CreateReleaseOpts ¶ added in v0.11.0
type PerformBackportOpts ¶ added in v0.11.0
type TokenSource ¶
type TokenSource struct {
AccessToken string
}