Prepare ReleaseKit hosted-page delivery

This commit is contained in:
2026-10-05 20:56:57 +00:00
parent 9e619c98a4
commit d0247d1ccb
8 changed files with 228 additions and 19 deletions

View File

@@ -423,6 +423,7 @@ func writeDeliveryReceipt(t *testing.T, repository string, settings cli.BuildSet
type deliveryServerState struct {
commit string
product string
remoteCommit string
apiRequests int
pageExists bool
@@ -537,7 +538,11 @@ func newDeliveryServer(t *testing.T, state *deliveryServerState) *httptest.Serve
func writeDeliveryRelease(w http.ResponseWriter, serverURL string, state *deliveryServerState) {
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(map[string]any{"id": 10, "html_url": serverURL + "/releases/10", "tag_name": "v1.2.3", "target_commitish": state.commit, "name": "Example Product v1.2.3", "body": state.noteBody, "draft": false, "prerelease": false})
product := state.product
if product == "" {
product = "Example Product"
}
_ = json.NewEncoder(w).Encode(map[string]any{"id": 10, "html_url": serverURL + "/releases/10", "tag_name": "v1.2.3", "target_commitish": state.commit, "name": product + " v1.2.3", "body": state.noteBody, "draft": false, "prerelease": false})
}
func writeDeliveryProfile(t *testing.T, repository string, settings cli.Settings) {