From 8572e71a7f0d6e49226a2fade69c02d03580fb92 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Mon, 27 Nov 2023 19:46:55 +0900 Subject: [PATCH] Fix issue will be detected as pull request when checking `First-time contributor` (#28237) Fix #28224 --- routers/web/repo/issue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 3ea40fe8c..ba8b49774 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -1319,7 +1319,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use return roleDescriptor, err } else if hasMergedPR { roleDescriptor.RoleInRepo = issues_model.RoleRepoContributor - } else { + } else if issue.IsPull { // only display first time contributor in the first opening pull request roleDescriptor.RoleInRepo = issues_model.RoleRepoFirstTimeContributor }