Version: v1.2.0 Latest Latest

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 10 Imported by: 0




View Source
const (
	// EventTypeHeader represents the header key for event type of SVN, e.g X-Subversion-Event=Post-Commit.
	EventTypeHeader = "X-Subversion-Event"

	// PostCommitEvent represents post commit type event
	PostCommitEvent = "Post-Commit"


This section is empty.


func NewSVN

func NewSVN(scmCfg *v1alpha1.SCMSource) (scm.Provider, error)

NewSVN new SVN client

func ParseEvent added in v0.9.6

func ParseEvent(request *http.Request) *scm.EventData

ParseEvent parses data from SVN events, only support Post-Commit.


type PostCommit added in v0.9.6

type PostCommit struct {
	// RepoUUID represents svn repository uuid of this trigger commit
	// Exec command:
	// `svn info --show-item repos-uuid --username {user} --password {password} --non-interactive
	// --trust-server-cert-failures unknown-ca,cn-mismatch,expired,not-yet-valid,other
	// --no-auth-cache {url}`
	// or
	// `svnlook uuid {repoPath}`
	// can get the repo uuid
	RepoUUID string `json:"repoUUID"`
	// Revision represents the revision of this trigger commit
	Revision string `json:"revision"`
	// Changed describes the changed content of a svn commit
	Changed string `json:"changed"`

PostCommit is PostCommit Event type body struct

type SVN

type SVN struct {
	// contains filtered or unexported fields

SVN represents the SCM provider of SVN.

func (*SVN) CheckToken

func (s *SVN) CheckToken() error

CheckToken ...

func (*SVN) CreateStatus added in v0.9.6

func (s *SVN) CreateStatus(status c_v1alpha1.StatusPhase, targetURL, repoURL, commitSha string) error

CreateStatus ...

func (*SVN) CreateWebhook

func (s *SVN) CreateWebhook(repo string, webhook *scm.Webhook) error

CreateWebhook ...

func (*SVN) DeleteWebhook

func (s *SVN) DeleteWebhook(repo string, webhookURL string) error

DeleteWebhook ...

func (*SVN) GetPullRequestSHA added in v0.9.6

func (s *SVN) GetPullRequestSHA(repoURL string, number int) (string, error)

GetPullRequestSHA ...

func (*SVN) GetToken

func (s *SVN) GetToken() (string, error)

GetToken ...

func (*SVN) ListBranches

func (s *SVN) ListBranches(repo string) ([]string, error)

ListBranches ...

func (*SVN) ListDockerfiles

func (s *SVN) ListDockerfiles(repo string) ([]string, error)

ListDockerfiles ...

func (*SVN) ListPullRequests added in v0.9.7

func (s *SVN) ListPullRequests(repo, state string) ([]scm.PullRequest, error)

ListPullRequests list pull requests of repo, repo format must be {owner}/{repo}.

func (*SVN) ListRepos

func (s *SVN) ListRepos() ([]scm.Repository, error)

ListRepos ...

func (*SVN) ListTags

func (s *SVN) ListTags(repo string) ([]string, error)

ListTags ...

Source Files

Jump to

Keyboard shortcuts

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