]> source.dussan.org Git - gitea.git/commitdiff
Fix issue will be detected as pull request when checking `First-time contributor...
authoryp05327 <576951401@qq.com>
Mon, 27 Nov 2023 10:46:55 +0000 (19:46 +0900)
committerGitHub <noreply@github.com>
Mon, 27 Nov 2023 10:46:55 +0000 (10:46 +0000)
Fix #28224

routers/web/repo/issue.go

index 3ea40fe8c9a725dff92df4acf4d007874c4589a0..ba8b49774b9771200b2704e76634593b7a6d0139 100644 (file)
@@ -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
        }