|
|
@ -93,6 +93,16 @@ func (issue *Issue) loadRepo(e Engine) (err error) { |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GetPullRequest returns the issue pull request
|
|
|
|
|
|
|
|
func (issue *Issue) GetPullRequest() (pr *PullRequest, err error) { |
|
|
|
|
|
|
|
if !issue.IsPull { |
|
|
|
|
|
|
|
return nil, fmt.Errorf("Issue is not a pull request") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pr, err = getPullRequestByIssueID(x, issue.ID) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (issue *Issue) loadAttributes(e Engine) (err error) { |
|
|
|
func (issue *Issue) loadAttributes(e Engine) (err error) { |
|
|
|
if err := issue.loadRepo(e); err != nil { |
|
|
|
if err := issue.loadRepo(e); err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
@ -1780,4 +1790,3 @@ func DeleteMilestoneByRepoID(repoID, id int64) error { |
|
|
|
} |
|
|
|
} |
|
|
|
return sess.Commit() |
|
|
|
return sess.Commit() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|