Skip to content

Conversation

@DecSmith42
Copy link
Owner

Also added a test to ensure functionality.
This pull request introduces a new test and workflow generation for Dependabot integration, along with improvements to how Dependabot workflows are written and verified. The main focus is on supporting custom registries, update groups, and more accurate serialization of workflow options.

Dependabot workflow integration and test enhancements:

  • Added a new DependabotBuild class in DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/DependabotBuild.cs to define and generate a Dependabot workflow with custom registries, updates, and groups.
  • Introduced a test method DependabotBuild_GeneratesWorkflow in WorkflowTests.cs to verify that the Dependabot workflow is generated correctly and matches the expected output.
  • Added a verified output file WorkflowTests.DependabotBuild_GeneratesWorkflow.verified.txt to validate the workflow generation, including registries and update groups.

Dependabot workflow writer improvements:

  • Modified DependabotWorkflowWriter.cs to ensure registries and updates are only written when present, and improved serialization of update properties such as ecosystem, directory, registries, groups, schedule, and pull request limits. [1] [2] [3]

Minor code adjustments:

  • Updated DependabotUpdate record in DependabotOptions.cs to make Registries property optional instead of required, allowing for more flexible workflow definitions.
  • Added a new DependabotDir property in WorkflowTests.cs for platform-specific directory handling.

Copilot AI review requested due to automatic review settings February 11, 2026 00:40
Also added a test to ensure functionality.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Dependabot workflow generation in the GitHub workflows module by updating how Dependabot options are serialized and by adding a verification test to lock in the expected dependabot.yml output (including registries, updates, and update groups).

Changes:

  • Updated Dependabot workflow writer to conditionally emit registries and updates sections and to serialize per-update fields (ecosystem, directory, registries, groups, schedule, PR limits).
  • Made DependabotUpdate.Registries optional (no longer required) to allow simpler update definitions.
  • Added a new DependabotBuild test build + verification test and verified output to validate Dependabot YAML generation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
DecSm.Atom.Module.GithubWorkflows/Generation/Options/DependabotOptions.cs Makes DependabotUpdate.Registries optional to support updates without registries.
DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs Adjusts Dependabot YAML serialization logic for registries/updates/groups/schedule.
DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.cs Adds a Dependabot workflow generation verification test and .github path handling.
DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.DependabotBuild_GeneratesWorkflow.verified.txt Adds the approved/verified Dependabot YAML output for snapshot testing.
DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/DependabotBuild.cs Introduces a build definition used by the new Dependabot workflow generation test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Updated `DependabotWorkflowWriter` to generate registry types dynamically based on registry configuration. Adjusted tests to verify the change.
Ensured `DependabotWorkflowWriter` correctly skips groups with empty or null patterns during workflow generation. Prevented unnecessary "patterns:" section writing for such cases, improving output clarity.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DecSmith42 DecSmith42 merged commit f71679b into main Feb 11, 2026
49 checks passed
@DecSmith42 DecSmith42 deleted the fix/dependabot branch February 11, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant