Documentation
¶
Index ¶
Constants ¶
View Source
const ( RepositoryCreatedEventType = "repository" BranchCreatedEventType = "branch" ZeroedSha = "0000000000000000000000000000000000000000" )
Variables ¶
View Source
var SpecVersion = "0.4.1"
Functions ¶
func Sync ¶
func Sync(logger *zap.SugaredLogger) error
Types ¶
type Change ¶
type Change struct { Repository string `json:"repository"` Branch string `json:"branch"` Id string `json:"id"` Number int `json:"number"` Subject string `json:"subject"` Owner Commiter `json:"commiter"` CommitMessage string `json:"commitMessage"` CreatedOn float64 `json:"createdOn"` Status string `json:"status"` Ref string `json:"ref"` Ref_type string `json:"ref_type"` Before string `json:"before"` After string `json:"after"` }
type CommonFields ¶
type GithubEvent ¶
type GithubEvent struct { Event string // contains filtered or unexported fields }
func NewGithubEvent ¶
func NewGithubEvent(event string, repoURL string) (pEvent *GithubEvent)
func (*GithubEvent) HandleBranchCreatedEvent ¶
func (pEvent *GithubEvent) HandleBranchCreatedEvent() (string, error)
func (*GithubEvent) HandleRepoCreatedEvent ¶
func (pEvent *GithubEvent) HandleRepoCreatedEvent() (string, error)
func (*GithubEvent) TranslateIntoCDEvent ¶
func (pEvent *GithubEvent) TranslateIntoCDEvent() (string, error)
type PushChangeUpdated ¶
type PushChangeUpdated struct { OldHead string `json:"oldHead"` NewHead string `json:"newHead"` CommonFields Change }
func (*PushChangeUpdated) RepoUpdatedToCDEvent ¶
func (changeUpdated *PushChangeUpdated) RepoUpdatedToCDEvent() (string, error)
type PushRepoCreated ¶
type PushRepoCreated struct { Repository string `json:"repository"` HeadName string `json:"headName"` CommonFields }
func (*PushRepoCreated) RepositoryCreatedToCDEvent ¶
func (repoCreated *PushRepoCreated) RepositoryCreatedToCDEvent() (string, error)
Click to show internal directories.
Click to hide internal directories.