mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-25 14:26:54 +08:00
Fixed repo link in generated comment for cross repository dependency (#9863)
* fixed link to issue in issue comments after adding/removing a dependency, before links assumed the issue was in the same repository. also changed the format of the displayed issue since the issue will not necessarily be in the same repo * based on pr comments, changed to use HTMLURL instead of piecing together the issue url, and added an if statement around the issue link display as a nil protection * only showing repo name in dependency comment if the issue is from another repo Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
This commit is contained in:
@ -376,6 +376,11 @@ func (comments CommentList) loadDependentIssues(e Engine) error {
|
||||
for _, comment := range comments {
|
||||
if comment.DependentIssue == nil {
|
||||
comment.DependentIssue = issues[comment.DependentIssueID]
|
||||
if comment.DependentIssue != nil {
|
||||
if err := comment.DependentIssue.loadRepo(e); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user