From 33e3e47338a49bb1449b09702592f0a491359074 Mon Sep 17 00:00:00 2001 From: Declan Smith Date: Wed, 11 Feb 2026 13:43:31 +1000 Subject: [PATCH] feat(github-workflows): add support for Dependabot exclude paths Extended `DependabotOptions` with an `ExcludePaths` property, enabling exclusion of specific paths in Dependabot workflow generation. Updated `DependabotWorkflowWriter` to handle the new `exclude-paths` section when applicable. --- .../Generation/DependabotWorkflowWriter.cs | 7 +++++++ .../Generation/Options/DependabotOptions.cs | 2 ++ 2 files changed, 9 insertions(+) diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs index 4237dde..4bd7dc4 100644 --- a/DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs @@ -50,6 +50,13 @@ protected override void WriteWorkflow(WorkflowModel workflow) WriteLine($"target-branch: \"{update.TargetBranch}\""); WriteLine($"directory: \"{update.Directory}\""); + if (update.ExcludePaths is { Count: > 0 }) + using (WriteSection("exclude-paths:")) + { + foreach (var excludePath in update.ExcludePaths) + WriteLine($"- \"{excludePath}\""); + } + if (update.Registries.Count > 0) using (WriteSection("registries:")) { diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/Options/DependabotOptions.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/DependabotOptions.cs index 8095658..638a4d9 100644 --- a/DecSm.Atom.Module.GithubWorkflows/Generation/Options/DependabotOptions.cs +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/DependabotOptions.cs @@ -23,6 +23,8 @@ public sealed record DependabotUpdate( public IReadOnlyCollection Registries { get; init; } = []; public IReadOnlyCollection Groups { get; init; } = []; + + public IReadOnlyCollection ExcludePaths { get; init; } = []; } [PublicAPI]