Table of Contents

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
object
DependabotConfigWriter

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

StructuredTextWriter

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

config DependabotConfig

The 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

name string

The registry key (its YAML name).

registry DependabotRegistry

The registry configuration to serialize.