diff --git a/src/ModularPipelines.Build/Modules/UpdateReleaseNotesModule.cs b/src/ModularPipelines.Build/Modules/UpdateReleaseNotesModule.cs index f2d8da06c4..4ecedf2f0c 100644 --- a/src/ModularPipelines.Build/Modules/UpdateReleaseNotesModule.cs +++ b/src/ModularPipelines.Build/Modules/UpdateReleaseNotesModule.cs @@ -23,15 +23,12 @@ namespace ModularPipelines.Build.Modules; public class UpdateReleaseNotesModule : Module { private readonly IOptions _githubSettings; - private readonly IGitHubClient _gitHubClient; private readonly IOptions _publishSettings; public UpdateReleaseNotesModule(IOptions githubSettings, - IGitHubClient gitHubClient, IOptions publishSettings) { _githubSettings = githubSettings; - _gitHubClient = gitHubClient; _publishSettings = publishSettings; } @@ -70,7 +67,7 @@ protected override async Task ShouldSkip(IPipelineContext context) if (!string.IsNullOrWhiteSpace(releaseNotesContents.Trim())) { - await _gitHubClient.Repository.Release.Create(long.Parse(context.GitHub().EnvironmentVariables.RepositoryId!), + await context.GitHub().Client.Repository.Release.Create(long.Parse(context.GitHub().EnvironmentVariables.RepositoryId!), new NewRelease(versionInfoResult.Value) { Name = versionInfoResult.Value,