Documentation
¶
Index ¶
- type Gitlab
- func (g *Gitlab) AcceptMR(projID int, mrIID int, msg string) (state string, err error)
- func (g *Gitlab) AddProjectHook(projID int, hook *model.WebHook) (err error)
- func (g *Gitlab) AuditProjectHooks(projID int, hooks []*model.WebHook) (err error)
- func (g *Gitlab) AuditProjects(repos []*model.Repo, hooks []*model.WebHook) (err error)
- func (g *Gitlab) AwardEmojiUsernames(projID int, mrIID int) (usernames []string, err error)
- func (g *Gitlab) CloseMR(projID int, mrIID int) (err error)
- func (g *Gitlab) CommitDiff(projID int, sha string) (files []string, err error)
- func (g *Gitlab) CompareDiff(projID int, from string, to string) (files []string, err error)
- func (g *Gitlab) CreateMRNote(projID int, mrIID int, content string) (noteID int, err error)
- func (g *Gitlab) CreateTrigger(projectID int) (trigger *gitlab.PipelineTrigger, err error)
- func (g *Gitlab) DeleteMRNote(projID int, mrIID int, noteID int) (err error)
- func (g *Gitlab) DeletePojectHook(projID int, hookID int) (err error)
- func (g *Gitlab) EditProjectHook(projID int, hookID int, hook *model.WebHook) (err error)
- func (g *Gitlab) HostToken() (host string, token string, err error)
- func (g *Gitlab) LastGreenCommit(ciProjectID string, ciCommitRefName string) (commit string, err error)
- func (g *Gitlab) LastPipeLineState(projID int, ciCommitRefName string) (state bool, err error)
- func (g *Gitlab) ListProjectHook(projID int) (hooks []*gitlab.ProjectHook, err error)
- func (g *Gitlab) MRChanges(projID, mrIID int) (changeFiles []string, deleteFiles []string, err error)
- func (g *Gitlab) MRPipelineStatus(projID int, mrIID int) (id int, status string, err error)
- func (g *Gitlab) MergeLabels(projID int, mrIID int) (labels []string, err error)
- func (g *Gitlab) MergeStatus(projID int, mrIID int) (wip bool, state string, status string, err error)
- func (g *Gitlab) PlusUsernames(projID int, mrIID int) (usernames []string, err error)
- func (g *Gitlab) ProjectID(url string) (projID int, err error)
- func (g *Gitlab) RepoRawFile(projID int, branch string, filename string) (content []byte, err error)
- func (g *Gitlab) TakeOwnership(projectID int, triggerID int) (trigger *gitlab.PipelineTrigger, err error)
- func (g *Gitlab) TriggerPipeline(projectID int, ref string, token string) (pipeline *gitlab.Pipeline, err error)
- func (g *Gitlab) Triggers(projectID int) (triggers []*gitlab.PipelineTrigger, err error)
- func (g *Gitlab) UpdateMRNote(projID int, mrIID int, noteID int, content string) (err error)
- func (g *Gitlab) UserName(userID int) (userName string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gitlab ¶
type Gitlab struct {
// contains filtered or unexported fields
}
Gitlab def
func (*Gitlab) AddProjectHook ¶
AddProjectHook add project hook for the project
func (*Gitlab) AuditProjectHooks ¶
AuditProjectHooks check and add or edit the project webhooks
func (*Gitlab) AuditProjects ¶
AuditProjects audit all the given projects
func (*Gitlab) AwardEmojiUsernames ¶
AwardEmojiUsernames get the username who gave the emoji
func (*Gitlab) CommitDiff ¶
CommitDiff ...
func (*Gitlab) CompareDiff ¶
CompareDiff ...
func (*Gitlab) CreateMRNote ¶
CreateMRNote create note to merge request
func (*Gitlab) CreateTrigger ¶
CreateTrigger create the trigger to trigger pipeline
func (*Gitlab) DeleteMRNote ¶
DeleteMRNote delete the specified note for merge request
func (*Gitlab) DeletePojectHook ¶
DeletePojectHook delete the specified hook for the project
func (*Gitlab) EditProjectHook ¶
EditProjectHook edit the specified webhook for the project
func (*Gitlab) LastGreenCommit ¶
func (g *Gitlab) LastGreenCommit(ciProjectID string, ciCommitRefName string) (commit string, err error)
LastGreenCommit get last green pipeline commit
func (*Gitlab) LastPipeLineState ¶
LastPipeLineState query Last PipeLineState
func (*Gitlab) ListProjectHook ¶
ListProjectHook list all the webhook for the project
func (*Gitlab) MRChanges ¶
func (g *Gitlab) MRChanges(projID, mrIID int) (changeFiles []string, deleteFiles []string, err error)
MRChanges ...
func (*Gitlab) MRPipelineStatus ¶
MRPipelineStatus query PipelineState for mr
func (*Gitlab) MergeLabels ¶
MergeLabels get Merge request labels
func (*Gitlab) MergeStatus ¶
func (g *Gitlab) MergeStatus(projID int, mrIID int) (wip bool, state string, status string, err error)
MergeStatus query MergeStatus
func (*Gitlab) PlusUsernames ¶
PlusUsernames get the username who +1
func (*Gitlab) RepoRawFile ¶
func (g *Gitlab) RepoRawFile(projID int, branch string, filename string) (content []byte, err error)
RepoRawFile ...
func (*Gitlab) TakeOwnership ¶
func (g *Gitlab) TakeOwnership(projectID int, triggerID int) (trigger *gitlab.PipelineTrigger, err error)
TakeOwnership take ownership of the trigger
func (*Gitlab) TriggerPipeline ¶
func (g *Gitlab) TriggerPipeline(projectID int, ref string, token string) (pipeline *gitlab.Pipeline, err error)
TriggerPipeline trigger the pipeline
func (*Gitlab) UpdateMRNote ¶
UpdateMRNote update the specified merge request note