svn

package
v0.9.8-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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"
)

Variables

This section is empty.

Functions

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.

Types

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"`
	// RepoName represents the revision of this trigger commit
	Revision string `json:"revision"`
}

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 ...

Jump to

Keyboard shortcuts

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