Exemple #1
0
 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
 };
Exemple #2
0
 public static void GitHubPublishRelease(GitHubReleaseSettings settings) =>
 settings
 .CreateHeader()
 .CreateClient()
 .Repository
 .Release
 .Create(
     settings.RepositoryOwner,
     settings.RepositoryName,
     settings.CreateRelease())
 .ObserveOn(Scheduler.Immediate)
 .Subscribe();
Exemple #3
0
 public static GitHubReleaseSettings SetReleaseBody(this GitHubReleaseSettings settings, string releaseBody)
 => settings.NewInstance().Do(x => x.ReleaseBody = releaseBody);
Exemple #4
0
 public static GitHubReleaseSettings SetReleaseName(this GitHubReleaseSettings settings, string releaseName)
 => settings.NewInstance().Do(x => x.ReleaseName = releaseName);
Exemple #5
0
 public static GitHubReleaseSettings SetTargetCommitish(this GitHubReleaseSettings settings, string commitish)
 => settings.NewInstance().Do(x => x.TargetCommitish = commitish);
Exemple #6
0
 public static GitHubReleaseSettings DisablePrerelease(this GitHubReleaseSettings settings)
 => settings.NewInstance().Do(x => x.Prerelease = false);
Exemple #7
0
 public static GitHubReleaseSettings SetPrerelease(this GitHubReleaseSettings settings, bool prerelease)
 => settings.NewInstance().Do(x => x.Prerelease = prerelease);
Exemple #8
0
 public static GitHubReleaseSettings DisableDraft(this GitHubReleaseSettings settings)
 => settings.NewInstance().Do(x => x.Draft = false);
Exemple #9
0
 public static GitHubReleaseSettings EnableDraft(this GitHubReleaseSettings settings)
 => settings.NewInstance().Do(x => x.Draft = true);
Exemple #10
0
 public static GitHubReleaseSettings SetDraft(this GitHubReleaseSettings settings, bool draft)
 => settings.NewInstance().Do(x => x.Draft = draft);
Exemple #11
0
 public static GitHubReleaseSettings SetTag(this GitHubReleaseSettings settings, string tag)
 => settings.NewInstance().Do(x => x.Tag = tag);
Exemple #12
0
 private static ProductHeaderValue CreateHeader(this GitHubReleaseSettings settings) =>
 new ProductHeaderValue(settings.RepositoryName);