// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise.
760820
func (p *PullRequestComment) GetPullRequestURL() string {
	if p == nil || p.PullRequestURL == nil {
		return ""
	}
	return *p.PullRequestURL
}
136636
func (m *Milestone) GetURL() string {
	if m == nil || m.URL == nil {
		return ""
	}
	return *m.URL
}
1077395
func (i *Issue) GetRepositoryURL() string {
	if i == nil || i.RepositoryURL == nil {
		return ""
	}
	return *i.RepositoryURL
}
95570
func (p *PullRequestComment) GetHTMLURL() string {
	if p == nil || p.HTMLURL == nil {
		return ""
	}
	return *p.HTMLURL
}
132896
func (p *PushEventCommit) GetURL() string {
	if p == nil || p.URL == nil {
		return ""
	}
	return *p.URL
}
393254
func (p *PullRequestLinks) GetDiffURL() string {
	if p == nil || p.DiffURL == nil {
		return ""
	}
	return *p.DiffURL
}
634557
func (t *TeamDiscussion) GetURL() string {
	if t == nil || t.URL == nil {
		return ""
	}
	return *t.URL
}
711354
func (r *RepositoryInvitation) GetURL() string {
	if r == nil || r.URL == nil {
		return ""
	}
	return *r.URL
}
763744
func (p *PullRequestComment) GetURL() string {
	if p == nil || p.URL == nil {
		return ""
	}
	return *p.URL
}
178875
func (r *RepositoryCommit) GetURL() string {
	if r == nil || r.URL == nil {
		return ""
	}
	return *r.URL
}
49299
func (t *TeamLDAPMapping) GetURL() string {
	if t == nil || t.URL == nil {
		return ""
	}
	return *t.URL
}
37805
func (p *PushEventRepository) GetHTMLURL() string {
	if p == nil || p.HTMLURL == nil {
		return ""
	}
	return *p.HTMLURL
}
278202
func (r *RepositoryRelease) GetHTMLURL() string {
	if r == nil || r.HTMLURL == nil {
		return ""
	}
	return *r.HTMLURL
}
10594
func (u *UserLDAPMapping) GetURL() string {
	if u == nil || u.URL == nil {
		return ""
	}
	return *u.URL
}
600210
func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch string) (*PullRequest, error) {
	pr := new(PullRequest)
	has, err := x.Where("head_repo_id=? AND head_branch=? AND base_repo_id=? AND base_branch=? AND has_merged=? AND issue.is_closed=?",
		headRepoID, headBranch, baseRepoID, baseBranch, false, false).
		Join("INNER", "issue", "issue.id=pull_request.issue_id").Get(pr)
	if err != nil {
		return nil, err
	} else if !has {
		return nil, ErrPullRequestNotExist{0, 0, headRepoID, baseRepoID, headBranch, baseBranch}
	}

	return pr, nil
}
166200
func (p *PullRequestReview) GetHTMLURL() string {
	if p == nil || p.HTMLURL == nil {
		return ""
	}
	return *p.HTMLURL
}
16051
func (p *PullRequest) GetHTMLURL() string {
	if p == nil || p.HTMLURL == nil {
		return ""
	}
	return *p.HTMLURL
}