private static NewRelease CreateRelease(this GitHubReleaseSettings settings) => new NewRelease(settings.Tag) { Name = settings.ReleaseName, Body = settings.ReleaseBody, Draft = settings.Draft, Prerelease = settings.Prerelease, TargetCommitish = settings.TargetCommitish };
public static void GitHubPublishRelease(GitHubReleaseSettings settings) => settings .CreateHeader() .CreateClient() .Repository .Release .Create( settings.RepositoryOwner, settings.RepositoryName, settings.CreateRelease()) .ObserveOn(Scheduler.Immediate) .Subscribe();
public static GitHubReleaseSettings SetReleaseBody(this GitHubReleaseSettings settings, string releaseBody) => settings.NewInstance().Do(x => x.ReleaseBody = releaseBody);
public static GitHubReleaseSettings SetReleaseName(this GitHubReleaseSettings settings, string releaseName) => settings.NewInstance().Do(x => x.ReleaseName = releaseName);
public static GitHubReleaseSettings SetTargetCommitish(this GitHubReleaseSettings settings, string commitish) => settings.NewInstance().Do(x => x.TargetCommitish = commitish);
public static GitHubReleaseSettings DisablePrerelease(this GitHubReleaseSettings settings) => settings.NewInstance().Do(x => x.Prerelease = false);
public static GitHubReleaseSettings SetPrerelease(this GitHubReleaseSettings settings, bool prerelease) => settings.NewInstance().Do(x => x.Prerelease = prerelease);
public static GitHubReleaseSettings DisableDraft(this GitHubReleaseSettings settings) => settings.NewInstance().Do(x => x.Draft = false);
public static GitHubReleaseSettings EnableDraft(this GitHubReleaseSettings settings) => settings.NewInstance().Do(x => x.Draft = true);
public static GitHubReleaseSettings SetDraft(this GitHubReleaseSettings settings, bool draft) => settings.NewInstance().Do(x => x.Draft = draft);
public static GitHubReleaseSettings SetTag(this GitHubReleaseSettings settings, string tag) => settings.NewInstance().Do(x => x.Tag = tag);
private static ProductHeaderValue CreateHeader(this GitHubReleaseSettings settings) => new ProductHeaderValue(settings.RepositoryName);