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