varcurrentStarsintfor{time.Sleep(interval)project,_,badLuck:=jihu.Projects.GetProject(config.ProjectID,&gitlab.GetProjectOptions{})ifbadLuck!=nil{logger.Warn("failed to get project",zap.Int("projectID",config.ProjectID),zap.Error(badLuck))continue}ifproject.StarCount==currentStars{// relax
continue}currentStars=project.StarCountnewName:=fmt.Sprintf("这个项目有%d个星标",currentStars)newPath:=fmt.Sprintf("This-Project-Has-%d-Stars",currentStars)_,_,badLuck=jihu.Projects.EditProject(config.ProjectID,&gitlab.EditProjectOptions{Name:&newName,Path:&newPath,})ifbadLuck!=nil{logger.Warn("failed to update start count",zap.Int("projectID",config.ProjectID),zap.Error(err))continue}logger.Info("new star count updated",zap.Int("projectID",config.ProjectID),zap.Int("stars",currentStars))}