mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-15 19:42:04 +00:00
Backport #25698.
Fix #25697.
Just avoid panic, maybe there's another bug to trigger this case.
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 53276d3e49
)
This commit is contained in:
parent
493a45615d
commit
d64417a6fa
4 changed files with 17 additions and 11 deletions
|
@ -1455,10 +1455,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue