forked from forgejo/forgejo
Reopen PR need retest patch
This commit is contained in:
parent
379629d28a
commit
c3ba5590c9
10 changed files with 171 additions and 135 deletions
|
@ -92,15 +92,6 @@ func (i *Issue) AfterSet(colName string, _ xorm.Cell) {
|
|||
if err != nil {
|
||||
log.Error(3, "GetUserByID[%d]: %v", i.ID, err)
|
||||
}
|
||||
case "is_pull":
|
||||
if !i.IsPull {
|
||||
return
|
||||
}
|
||||
|
||||
i.PullRequest, err = GetPullRequestByIssueID(i.ID)
|
||||
if err != nil {
|
||||
log.Error(3, "GetPullRequestByIssueID[%d]: %v", i.ID, err)
|
||||
}
|
||||
case "created":
|
||||
i.Created = regulateTimeZone(i.Created)
|
||||
}
|
||||
|
@ -282,6 +273,15 @@ func (i *Issue) ChangeStatus(doer *User, isClosed bool) (err error) {
|
|||
return sess.Commit()
|
||||
}
|
||||
|
||||
func (i *Issue) GetPullRequest() (err error) {
|
||||
if i.PullRequest != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
i.PullRequest, err = GetPullRequestByIssueID(i.ID)
|
||||
return err
|
||||
}
|
||||
|
||||
// It's caller's responsibility to create action.
|
||||
func newIssue(e *xorm.Session, repo *Repository, issue *Issue, labelIDs []int64, uuids []string, isPull bool) (err error) {
|
||||
if _, err = e.Insert(issue); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue