mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Check ctx.Written()
for GetActionIssue
(#25698)
Fix #25697. Just avoid panic, maybe there's another bug to trigger this case. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -1491,10 +1491,10 @@ func DownloadPullDiffOrPatch(ctx *context.Context, patch bool) {
|
||||
// UpdatePullRequestTarget change pull request's target branch
|
||||
func UpdatePullRequestTarget(ctx *context.Context) {
|
||||
issue := GetActionIssue(ctx)
|
||||
pr := issue.PullRequest
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
pr := issue.PullRequest
|
||||
if !issue.IsPull {
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
Reference in New Issue
Block a user