aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/commit.go')
-rw-r--r--routers/web/repo/commit.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go
index 9a06c9359b..0c60abcecd 100644
--- a/routers/web/repo/commit.go
+++ b/routers/web/repo/commit.go
@@ -15,6 +15,7 @@ import (
asymkey_model "code.gitea.io/gitea/models/asymkey"
"code.gitea.io/gitea/models/db"
git_model "code.gitea.io/gitea/models/git"
+ issues_model "code.gitea.io/gitea/models/issues"
"code.gitea.io/gitea/models/renderhelper"
repo_model "code.gitea.io/gitea/models/repo"
unit_model "code.gitea.io/gitea/models/unit"
@@ -411,6 +412,11 @@ func Diff(ctx *context.Context) {
}
}
+ pr, _ := issues_model.GetPullRequestByMergedCommit(ctx, ctx.Repo.Repository.ID, commitID)
+ if pr != nil {
+ ctx.Data["MergedPRIssueNumber"] = pr.Index
+ }
+
ctx.HTML(http.StatusOK, tplCommitPage)
}