From d0268b1b9fef5da8a82be673f88cacf0f04657d7 Mon Sep 17 00:00:00 2001 From: Charles Mager Date: Thu, 26 Oct 2017 16:33:21 +0100 Subject: [PATCH] Change PublishRelease to PublishDraft to match GitHub UI --- build.fsx | 2 +- src/app/Fake.Api.GitHub/GitHub.fs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.fsx b/build.fsx index cefee1744e7..827d0976569 100644 --- a/build.fsx +++ b/build.fsx @@ -923,7 +923,7 @@ Target.Create "FastRelease" (fun _ -> GitHub.CreateClientWithToken token |> GitHub.CreateDraftWithNotes gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes |> GitHub.UploadFiles files - |> GitHub.ReleaseDraft + |> GitHub.PublishDraft |> Async.RunSynchronously #else let draft = diff --git a/src/app/Fake.Api.GitHub/GitHub.fs b/src/app/Fake.Api.GitHub/GitHub.fs index 52f5072af98..12addc52a37 100644 --- a/src/app/Fake.Api.GitHub/GitHub.fs +++ b/src/app/Fake.Api.GitHub/GitHub.fs @@ -186,13 +186,13 @@ module GitHub = return release' } - /// Publishes the specified release by removing its Draft status - let ReleaseDraft (release : Async) = + /// Publishes the specified release by removing its draft status + let PublishDraft (release : Async) = retryWithArg 5 release <| fun release' -> async { let update = release'.Release.ToUpdate() update.Draft <- Nullable(false) let! released = Async.AwaitTask <| release'.Client.Repository.Release.Edit(release'.Owner, release'.RepoName, release'.Release.Id, update) - printfn "Released %d on GitHub" released.Id + printfn "Published release %d on GitHub" released.Id } /// Gets the latest release for the specified repository