diff --git a/pkg/cibot/repohandler.go b/pkg/cibot/repohandler.go index d1b4990183c8f4c0892824f005dde06f11c41ea6..e8f44228ca016b7614a7ea711ac5658ca1e2b526 100644 --- a/pkg/cibot/repohandler.go +++ b/pkg/cibot/repohandler.go @@ -389,6 +389,9 @@ func (handler *RepoHandler) addRepositoriesinGitee(owner string, repo Repository for _, br := range repo.ProtectedBranches { _, _, err := handler.GiteeClient.RepositoriesApi.PostV5ReposOwnerRepoBranches(handler.Context, owner, *repo.Name, "master", br, getOpts) + if br == "master" { + continue + } if err != nil { glog.Errorf("fail to add branch (%s) for repository (%s): %v", br, *repo.Name, err) return err