forked from tangled.org/core
this repo has no description

knotserver: add format_patch capability

Changed files
+7
appview
state
knotserver
types
+5
appview/state/pull.go
···
return
}
+
if !caps.PullRequests.FormatPatch {
+
s.pages.Notice(w, "pull", "This knot doesn't support format-patch. Unfortunately, there is no fallback for now.")
+
return
+
}
+
// Handle the PR creation based on the type
if isBranchBased {
if !caps.PullRequests.BranchSubmissions {
+1
knotserver/routes.go
···
capabilities := map[string]any{
"pull_requests": map[string]any{
+
"format_patch": true,
"patch_submissions": true,
"branch_submissions": true,
"fork_submissions": true,
+1
types/capabilities.go
···
type Capabilities struct {
PullRequests struct {
+
FormatPatch bool `json:"format_patch"`
PatchSubmissions bool `json:"patch_submissions"`
BranchSubmissions bool `json:"branch_submissions"`
ForkSubmissions bool `json:"fork_submissions"`