We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 499b218 commit c3a8051Copy full SHA for c3a8051
Skyline.DataMiner.CICD.Tools.GitHubToCatalogYaml/CatalogManager.cs
@@ -184,13 +184,19 @@ private async Task CheckTags(CatalogYaml catalogYaml)
184
catalogYaml.Tags = new List<string>();
185
}
186
187
+ if(catalogYaml.Tags.Count >= 5)
188
+ {
189
+ logger.LogDebug("Catalog YAML has the max amount of tags already. Skipping the adding GitHub topics step.");
190
+ return;
191
+ }
192
+
193
var topics = await service.GetRepositoryTopicsAsync();
194
if (topics is { Count: > 0 })
195
{
196
catalogYaml.Tags.AddRange(topics);
197
198
// Remove duplicates
- catalogYaml.Tags = catalogYaml.Tags.Distinct().ToList();
199
+ catalogYaml.Tags = catalogYaml.Tags.Distinct().Take(5).ToList();
200
logger.LogDebug("Distinct GitHub Topics found and applied.");
201
202
0 commit comments