Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TargetCommitish to CreateReleaseParams #2367

Merged
merged 1 commit into from
Aug 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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