From 392f8d0a4ccc743bed6d60dcf941a1b74f8e3164 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 76bb67ceaaa1d..76152c9121879 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -1306,7 +1306,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 }