From 694f748f38d47bd40de5bc564e7a2fe52f51f9e4 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> (cherry picked from commit 76e892317b22cad38ce73d41483467699a16a76d) --- 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 dbc7443727..cd14fff6bd 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -1309,7 +1309,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 }