Documentation ¶
Index ¶
- Constants
- func IsAutomaticMergeAllowed(pipelines []MergeRequestPipeline) bool
- func IsPipelineRunning(pipelines []MergeRequestPipeline) bool
- type ApiClient
- func (client *ApiClient) CreateMergeRequest(sourceBranch string, targetBranch string, title string) (int, error)
- func (client *ApiClient) CreateMergeRequestNote(mergeRequestIid int, noteBody string) error
- func (client *ApiClient) DeleteBranch(branchName string) error
- func (client *ApiClient) GetMergeRequestDetails(mergeRequestIid int) (*MergeRequestDetails, error)
- func (client *ApiClient) GetMergeRequestPipelines(mergeRequestIid int) ([]MergeRequestPipeline, error)
- func (client *ApiClient) ListBranches(namePatterns []string) ([]Branch, error)
- func (client *ApiClient) ListMergeRequestNotes(mergeRequestIid int) ([]MergeRequestNote, error)
- func (client *ApiClient) ListMergeRequests() ([]MergeRequestDetails, error)
- func (client *ApiClient) MergeMergeRequest(mergeRequestIid int, currentSha string) (*MergeRequestDetails, error)
- func (client *ApiClient) RebaseMergeRequest(mergeRequestIid int, shouldSkipCi bool) error
- type Branch
- type CommitDetails
- type MergeRequestDetails
- type MergeRequestNote
- type MergeRequestPipeline
Constants ¶
View Source
const BranchesEndpoint = "/api/v4/projects/{" + projectIdParam + "}/repository/branches"
View Source
const DeleteBranchEndpoint = "/api/v4/projects/{" + projectIdParam + "}/repository/branches/{" + branchIdParam + "}"
View Source
const MergeRequestsDetailsEndpoint = "/api/v4/projects/{" + projectIdParam + "}/merge_requests/{" + mergeRequestIdParam + "}"
View Source
const MergeRequestsEndpoint = "/api/v4/projects/{" + projectIdParam + "}/merge_requests"
View Source
const MergeRequestsEventsEndpoint = "/api/v4/projects/{" + projectIdParam + "}/merge_requests/{" + mergeRequestIdParam + "}/notes"
View Source
const MergeRequestsMergeEndpoint = "/api/v4/projects/{" + projectIdParam + "}/merge_requests/{" + mergeRequestIdParam + "}/merge"
View Source
const MergeRequestsPipelinesEndpoint = "/api/v4/projects/{" + projectIdParam + "}/merge_requests/{" + mergeRequestIdParam + "}/pipelines"
View Source
const MergeRequestsRebaseEndpoint = "/api/v4/projects/{" + projectIdParam + "}/merge_requests/{" + mergeRequestIdParam + "}/rebase"
Variables ¶
This section is empty.
Functions ¶
func IsAutomaticMergeAllowed ¶
func IsAutomaticMergeAllowed(pipelines []MergeRequestPipeline) bool
func IsPipelineRunning ¶
func IsPipelineRunning(pipelines []MergeRequestPipeline) bool
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func (*ApiClient) CreateMergeRequest ¶
func (*ApiClient) CreateMergeRequestNote ¶
func (*ApiClient) DeleteBranch ¶
func (*ApiClient) GetMergeRequestDetails ¶
func (client *ApiClient) GetMergeRequestDetails(mergeRequestIid int) (*MergeRequestDetails, error)
func (*ApiClient) GetMergeRequestPipelines ¶
func (client *ApiClient) GetMergeRequestPipelines(mergeRequestIid int) ([]MergeRequestPipeline, error)
func (*ApiClient) ListBranches ¶
func (*ApiClient) ListMergeRequestNotes ¶
func (client *ApiClient) ListMergeRequestNotes(mergeRequestIid int) ([]MergeRequestNote, error)
func (*ApiClient) ListMergeRequests ¶
func (client *ApiClient) ListMergeRequests() ([]MergeRequestDetails, error)
func (*ApiClient) MergeMergeRequest ¶
func (client *ApiClient) MergeMergeRequest(mergeRequestIid int, currentSha string) (*MergeRequestDetails, error)
type Branch ¶
type Branch struct { Name string `json:"name"` Default bool `json:"default"` Commit CommitDetails `json:"commit"` }
type CommitDetails ¶
type MergeRequestDetails ¶
type MergeRequestDetails struct { Id int `json:"id"` Iid int `json:"iid"` Title string `json:"title"` State string `json:"state"` TargetBranch string `json:"target_branch"` SourceBranch string `json:"source_branch"` MergeWhenPipelineSucceeds bool `json:"merge_when_pipeline_succeeds"` MergeStatus string `json:"merge_status"` DetailedMergeStatus string `json:"detailed_merge_status"` HasConflicts bool `json:"has_conflicts"` ShouldRemoveSourceBranch bool `json:"should_remove_source_branch"` CommitsBehind int `json:"diverged_commits_count"` Sha string `json:"sha"` RebaseInProgress bool `json:"rebase_in_progress"` RebaseError string `json:"merge_error"` }
type MergeRequestNote ¶
Click to show internal directories.
Click to hide internal directories.