From 585f74c2ca66ed66ba01cee3bcf5f080eb5b5d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Thu, 2 Nov 2023 15:19:12 +0100 Subject: [PATCH] fix GET /repos/{owner}/{repo}/issues/comments/{id}/reactions (cherry picked from commit a146e3d0f9ff8ac1aee4be8a3632c76b35fc3482) --- routers/api/v1/repo/issue_reaction.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routers/api/v1/repo/issue_reaction.go b/routers/api/v1/repo/issue_reaction.go index b87d636b80..12614467bb 100644 --- a/routers/api/v1/repo/issue_reaction.go +++ b/routers/api/v1/repo/issue_reaction.go @@ -61,6 +61,12 @@ func GetIssueCommentReactions(ctx *context.APIContext) { if err := comment.LoadIssue(ctx); err != nil { ctx.Error(http.StatusInternalServerError, "comment.LoadIssue", err) + return + } + + if comment.Issue.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound() + return } if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {