func (c *IssueCreator) CreateAndSync() {
	var err error
	if err = c.initialize(); err != nil {
		glog.Fatalf("Error initializing IssueCreator: %v.", err)
	}
	glog.Info("IssueCreator initialization complete.")

	for srcName, src := range sources {
		glog.Infof("Generating issues from source: %s.", srcName)
		var issues []Issue
		if issues, err = src.Issues(c); err != nil {
			glog.Errorf("Error generating issues. Source: %s Msg: %v.", srcName, err)
			continue
		}

		// Note: We assume that no issues made by this bot with ID's matching issues generated by
		// sources will be created while this code is creating issues. If this is a possibility then
		// this loop should be updated to fetch recently changed issues from github after every issue
		// sync that results in an issue being created.
		glog.Infof("Syncing issues from source: %s.", srcName)
		created := 0
		for _, issue := range issues {
			if c.sync(issue) {
				created++
			}
		}
		glog.Infof(
			"Created issues for %d of the %d issues synced from source: %s.",
			created,
			len(issues),
			srcName,
		)
	}
}
func (c *IssueCreator) CreateAndSync() {
	var err error
	if err = c.initialize(); err != nil {
		glog.Fatalf("Error initializing IssueCreator: %v.", err)
	}
	glog.Info("IssueCreator initialization complete.")

	for srcName, src := range sources {
		glog.Infof("Generating issues from source: %s.", srcName)
		var issues []Issue
		if issues, err = src.Issues(c); err != nil {
			glog.Errorf("Error generating issues. Source: %s Msg: %v.", srcName, err)
			continue
		}

		
		
		
		
		glog.Infof("Syncing issues from source: %s.", srcName)
		created := 0
		for _, issue := range issues {
			if c.sync(issue) {
				created++
			}
		}
		glog.Infof(
			"Created issues for %d of the %d issues synced from source: %s.",
			created,
			len(issues),
			srcName,
		)
	}
}
func ( c * IssueCreator ) CreateAndSync ( ) { var err error if err = c . initialize ( ) ; err != nil { glog . Fatalf ( " " , err ) } glog . Info ( " " ) for srcName , src := range sources { glog . Infof ( " " , srcName ) var issues [ ] Issue if issues , err = src . Issues ( c ) ; err != nil { glog . Errorf ( " " , srcName , err ) continue } // Note: We assume that no issues made by this bot with ID's matching issues generated by // sources will be created while this code is creating issues. If this is a possibility then // this loop should be updated to fetch recently changed issues from github after every issue // sync that results in an issue being created. glog . Infof ( " " , srcName ) created := 0 for _ , issue := range issues { if c . sync ( issue ) { created ++ } } glog . Infof ( " " , created , len ( issues ) , srcName , ) } }
// CreateAndSync is the main workhorse function of IssueCreator. It initializes the IssueCreator,
// asks each source for its issues to sync, and syncs the issues.
CreateAndSync is the main workhorse function of IssueCreator . It initializes the IssueCreator asks each source for its issues to sync and syncs the issues .