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