// GetMilestonesURL returns the MilestonesURL field if it's non-nil, zero value otherwise.
770540
func (r *Repository) GetMilestonesURL() string {
	if r == nil || r.MilestonesURL == nil {
		return ""
	}
	return *r.MilestonesURL
}
1263037
func (u *UserLDAPMapping) GetGistsURL() string {
	if u == nil || u.GistsURL == nil {
		return ""
	}
	return *u.GistsURL
}
360115
func (o *Organization) GetEventsURL() string {
	if o == nil || o.EventsURL == nil {
		return ""
	}
	return *o.EventsURL
}
624271
func (m *MilestoneStats) GetOpenMilestones() int {
	if m == nil || m.OpenMilestones == nil {
		return 0
	}
	return *m.OpenMilestones
}
1022593
func (u *UserLDAPMapping) GetEventsURL() string {
	if u == nil || u.EventsURL == nil {
		return ""
	}
	return *u.EventsURL
}
586360
func (c *Contributor) GetEventsURL() string {
	if c == nil || c.EventsURL == nil {
		return ""
	}
	return *c.EventsURL
}
1031132
func (p *Project) GetColumnsURL() string {
	if p == nil || p.ColumnsURL == nil {
		return ""
	}
	return *p.ColumnsURL
}
459671
func (p *PushEventRepository) GetCloneURL() string {
	if p == nil || p.CloneURL == nil {
		return ""
	}
	return *p.CloneURL
}
1115306
func (t *Tab) GetDocumentCurrentUrl(docNodeId int) (string, error) {
	docNode, ok := t.getElement(docNodeId)
	if !ok {
		return "", &ElementNotFoundErr{Message: fmt.Sprintf("docNodeId %d not found", docNodeId)}
	}
	return docNode.node.DocumentURL, nil
}
1236655
func (m *MilestonesService) All(uri *Hyperlink, uriParams M) (milestones []Milestone, result *Result) {
	url, err := ExpandWithDefault(uri, &MilestonesURL, uriParams)
	if err != nil {
		return nil, &Result{Err: err}
	}

	result = m.client.get(url, &milestones)
	return
}
938158
func (u *User) GetSubscriptionsURL() string {
	if u == nil || u.SubscriptionsURL == nil {
		return ""
	}
	return *u.SubscriptionsURL
}
480914
func ChangeMilestoneStatus(m *Milestone, isClosed bool) (err error) {
	repo, err := GetRepositoryByID(m.RepoID)
	if err != nil {
		return err
	}

	sess := x.NewSession()
	defer sess.Close()
	if err = sess.Begin(); err != nil {
		return err
	}

	m.IsClosed = isClosed
	if err = updateMilestone(sess, m); err != nil {
		return err
	}

	repo.NumMilestones = int(countRepoMilestones(sess, repo.ID))
	repo.NumClosedMilestones = int(countRepoClosedMilestones(sess, repo.ID))
	if _, err = sess.ID(repo.ID).AllCols().Update(repo); err != nil {
		return err
	}
	return sess.Commit()
}
206166
func GetMilestonesByRepoID(repoID int64) ([]*Milestone, error) {
	miles := make([]*Milestone, 0, 10)
	return miles, x.Where("repo_id = ?", repoID).Find(&miles)
}
889624
func (r *Repository) GetIssuesURL() string {
	if r == nil || r.IssuesURL == nil {
		return ""
	}
	return *r.IssuesURL
}
1358015
func (u *User) GetFollowersURL() string {
	if u == nil || u.FollowersURL == nil {
		return ""
	}
	return *u.FollowersURL
}
1201640
func (c *CommitsComparison) GetPermalinkURL() string {
	if c == nil || c.PermalinkURL == nil {
		return ""
	}
	return *c.PermalinkURL
}
31699
func (c *CheckRunOutput) GetAnnotationsURL() string {
	if c == nil || c.AnnotationsURL == nil {
		return ""
	}
	return *c.AnnotationsURL
}