Skip to content

Commit

Permalink
Merge pull request #2367 from nikolamilekic/TargetCommitish
Browse files Browse the repository at this point in the history
Add TargetCommitish to CreateReleaseParams
  • Loading branch information
matthid authored Aug 17, 2019
2 parents c173933 + 6a1af8f commit 2b47bb0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/Fake.Api.GitHub/GitHub.fs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ module GitHub =
/// Indicates whether the release will be created as a draft
Draft : bool
/// Indicates whether the release will be created as a prerelease
Prerelease : bool }
Prerelease : bool
/// Commit hash or branch name that will be used to create the release tag.
/// Is not used if the tag already exists.
/// If left unspecified, and the tag does not already exist, the default branch is used instead.
TargetCommitish : string }

// wrapper re-implementation of HttpClientAdapter which works around
// known Octokit bug in which user-supplied timeouts are not passed to HttpClient object
Expand Down Expand Up @@ -153,13 +157,15 @@ module GitHub =
{ Name = tagName
Body = ""
Draft = true
Prerelease = false } |> setParams
Prerelease = false
TargetCommitish = "" } |> setParams

let data = NewRelease(tagName)
data.Name <- p.Name
data.Body <- p.Body
data.Draft <- p.Draft
data.Prerelease <- p.Prerelease
data.TargetCommitish <- p.TargetCommitish

let! release = Async.AwaitTask <| client'.Repository.Release.Create(owner, repoName, data)

Expand Down

0 comments on commit 2b47bb0

Please sign in to comment.