Skip to content

Commit

Permalink
fix: readme generation works as intended after bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrstv committed Feb 20, 2025
1 parent b26f66c commit 68da45e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Kodify/AutoDoc/Services/Documentation/MarkdownGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,30 @@ public class MarkdownGenerator
{
private readonly ReadmeGenerator _readmeGenerator;
private readonly ChangelogGenerator _changelogGenerator;
private readonly ProjectAnalyzer _projectAnalyzer;
private ProjectInfo _projectInfo;

// Parameterless constructor overload.
public MarkdownGenerator() : this(null)
{
_readmeGenerator = new ReadmeGenerator();
_changelogGenerator = new ChangelogGenerator();
_projectAnalyzer = new ProjectAnalyzer();
_projectInfo = _projectAnalyzer.Analyze();
}

// Constructor with AI service implemented
public MarkdownGenerator(IAIService aiService)
{
_readmeGenerator = new ReadmeGenerator(aiService);
_changelogGenerator = new ChangelogGenerator();
_projectAnalyzer = new ProjectAnalyzer();
_projectInfo = _projectAnalyzer.Analyze();
}

public async Task GenerateReadMeAsync(string projectName, string projectSummary, string usageInstructions, string template = null)

Check warning on line 37 in Kodify/AutoDoc/Services/Documentation/MarkdownGenerator.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Package

Cannot convert null literal to non-nullable reference type.
{
await _readmeGenerator.GenerateReadMeAsync(_projectInfo, projectName, projectSummary, usageInstructions, template);
}

public async Task GenerateReadMeAsync(ProjectInfo projectInfo, string projectName, string projectSummary, string usageInstructions, string template = null)

Check warning on line 42 in Kodify/AutoDoc/Services/Documentation/MarkdownGenerator.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Package

Cannot convert null literal to non-nullable reference type.
Expand Down

0 comments on commit 68da45e

Please sign in to comment.