Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark the Release Notes Builder integration test as "inconclusive" whe… #581

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public void Configure()
Log.Logger = _logger;

_token = Environment.GetEnvironmentVariable("GITTOOLS_GITHUB_TOKEN");
if (string.IsNullOrWhiteSpace(_token))
{
Assert.Inconclusive("Unable to locate credentials for accessing GitHub API");
}

_gitHubClient = new GitHubClient(new ProductHeaderValue("GitReleaseManager")) { Credentials = new Credentials(_token) };
}

Expand All @@ -50,44 +55,30 @@ public void TearDown()
[Explicit]
public async Task SingleMilestone()
{
if (string.IsNullOrWhiteSpace(_token))
{
Assert.Inconclusive("Unable to locate credentials for accessing GitHub API");
}
else
{
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);

var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.12.4", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}
var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.12.4", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}

[Test]
[Explicit]
public async Task SingleMilestone3()
{
if (string.IsNullOrWhiteSpace(_token))
{
Assert.Inconclusive("Unable to locate credentials for accessing GitHub API");
}
else
{
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);

var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.13.0", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}
var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.13.0", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}

[Test]
Expand Down
Loading