Class DependabotConfigWriter
- Namespace
- Invex.StructuredText.GithubActions
- Assembly
- Invex.StructuredText.GithubActions.dll
Serializes a DependabotConfig model to Dependabot v2 configuration YAML
(.github/dependabot.yml).
public sealed class DependabotConfigWriter
- Inheritance
-
objectDependabotConfigWriter
Examples
var writer = new DependabotConfigWriter();
writer.WriteConfig(config);
File.WriteAllText(".github/dependabot.yml", writer.TextWriter.ToString());
Remarks
The writer accumulates output in TextWriter; call ToString() to retrieve the YAML.
Constructors
DependabotConfigWriter()
public DependabotConfigWriter()
Properties
TextWriter
The underlying text writer that accumulates the generated YAML.
public StructuredTextWriter TextWriter { get; init; }
Property Value
Methods
WriteConfig(DependabotConfig)
Writes the complete Dependabot configuration — version, beta-ecosystems flag, registries, multi-ecosystem groups, and all update entries.
public void WriteConfig(DependabotConfig config)
Parameters
configDependabotConfigThe configuration model to serialize.
WriteRegistry(string, DependabotRegistry)
Writes a single named registry entry under the current section.
public void WriteRegistry(string name, DependabotRegistry registry)
Parameters
namestringThe registry key (its YAML name).
registryDependabotRegistryThe registry configuration to serialize.