diff --git a/project_mirror.go b/project_mirror.go index 129040ccb..b159a110c 100644 --- a/project_mirror.go +++ b/project_mirror.go @@ -40,6 +40,7 @@ type ProjectMirror struct { LastSuccessfulUpdateAt *time.Time `json:"last_successful_update_at"` LastUpdateAt *time.Time `json:"last_update_at"` LastUpdateStartedAt *time.Time `json:"last_update_started_at"` + MirrorBranchRegex string `json:"mirror_branch_regex"` OnlyProtectedBranches bool `json:"only_protected_branches"` KeepDivergentRefs bool `json:"keep_divergent_refs"` UpdateStatus string `json:"update_status"` @@ -107,6 +108,7 @@ func (s *ProjectMirrorService) GetProjectMirror(pid interface{}, mirror int, opt type AddProjectMirrorOptions struct { URL *string `url:"url,omitempty" json:"url,omitempty"` Enabled *bool `url:"enabled,omitempty" json:"enabled,omitempty"` + MirrorBranchRegex *string `url:"mirror_branch_regex,omitempty" json:"mirror_branch_regex,omitempty"` OnlyProtectedBranches *bool `url:"only_protected_branches,omitempty" json:"only_protected_branches,omitempty"` KeepDivergentRefs *bool `url:"keep_divergent_refs,omitempty" json:"keep_divergent_refs,omitempty"` } @@ -142,9 +144,10 @@ func (s *ProjectMirrorService) AddProjectMirror(pid interface{}, opt *AddProject // GitLab API docs: // https://docs.gitlab.com/ee/api/remote_mirrors.html#update-a-remote-mirrors-attributes type EditProjectMirrorOptions struct { - Enabled *bool `url:"enabled,omitempty" json:"enabled,omitempty"` - OnlyProtectedBranches *bool `url:"only_protected_branches,omitempty" json:"only_protected_branches,omitempty"` - KeepDivergentRefs *bool `url:"keep_divergent_refs,omitempty" json:"keep_divergent_refs,omitempty"` + Enabled *bool `url:"enabled,omitempty" json:"enabled,omitempty"` + MirrorBranchRegex *string `url:"mirror_branch_regex,omitempty" json:"mirror_branch_regex,omitempty"` + OnlyProtectedBranches *bool `url:"only_protected_branches,omitempty" json:"only_protected_branches,omitempty"` + KeepDivergentRefs *bool `url:"keep_divergent_refs,omitempty" json:"keep_divergent_refs,omitempty"` } // EditProjectMirror updates a project team member to a specified access level..