From 76e892317b22cad38ce73d41483467699a16a76d Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 29 Nov 2023 10:49:33 +0800 Subject: [PATCH] Fix issue will be detected as pull request when checking `First-time contributor` (#28237) (#28271) Backport #28237 by @yp05327 Fix #28224 Co-authored-by: yp05327 <576951401@qq.com> --- 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 76bb67ceaa..76152c9121 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 }