Make API "compare" accept commit IDs (#32801)

This commit is contained in:
wxiaoguang authored and GitHub committed 2024-12-12 08:10:09 +00:00
1 parent 01b1896bf5
commit 22bf2ca6ba
10 files changed
+154 -124

No files matched your search

-2
View File
@@ -9,7 +9,6 @@ import (
"fmt"
"html/template"
"net/http"
"net/url"
"strconv"
"strings"
@@ -114,7 +113,6 @@ func MustAllowPulls(ctx *context.Context) {
// User can send pull request if owns a forked repository.
if ctx.IsSigned && repo_model.HasForkedRepo(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID) {
ctx.Repo.PullRequest.Allowed = true
ctx.Repo.PullRequest.HeadInfoSubURL = url.PathEscape(ctx.Doer.Name) + ":" + util.PathEscapeSegments(ctx.Repo.BranchName)
}
}