Skip to content

Commit

Permalink
Fix go-gitea#9552: Merge commits generated by pull request capture pu…
Browse files Browse the repository at this point in the history
…ll request details (go-gitea#9635)
  • Loading branch information
shashvat-kedia authored and zeripath committed Jan 8, 2020
1 parent 74d6ec6 commit 632fb5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion models/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ func (pr *PullRequest) GetDefaultMergeMessage() string {
return ""
}
}
return fmt.Sprintf("Merge branch '%s' of %s/%s into %s", pr.HeadBranch, pr.MustHeadUserName(), pr.HeadRepo.Name, pr.BaseBranch)
if err := pr.LoadIssue(); err != nil {
log.Error("Cannot load issue %d for PR id %d: Error: %v", pr.IssueID, pr.ID, err)
return ""
}
return fmt.Sprintf("Merge pull request '%s' (#%d) from %s/%s into %s", pr.Issue.Title, pr.Issue.Index, pr.MustHeadUserName(), pr.HeadBranch, pr.BaseBranch)
}

// GetCommitMessages returns the commit messages between head and merge base (if there is one)
Expand Down

0 comments on commit 632fb5b

Please sign in to comment.