use a 202 if the asset was already published
[pharext/pharext.org] / app / Github / API / Releases / CreateRelease.php
index 5942f0ce1ea0ab4d2c5f31670ab6516a8abde45f..1cb22221fb1df584989573acbb1d5d83820e985f 100644 (file)
@@ -16,7 +16,8 @@ class CreateRelease extends Call
                        "Content-Type" => "application/json",
                ]);
                $request->getBody()->append(json_encode([
-                       "tag_name" => $this->args["tag"]
+                       "tag_name" => $this->args["tag"],
+                       "draft" => true,
                ]));
                $this->api->getClient()->enqueue($request, function($response) use($callback) {
                        if ($response->getResponseCode() >= 400 || null === ($json = json_decode($response->getBody()))) {