Prepare ReleaseKit hosted-page delivery
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user