Skip to content

Conversation

@mimachniak
Copy link

@mimachniak mimachniak commented Jan 19, 2026

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings updated.
  • Examples updated.
  • Unit tests updated. See DSC Community Testing Guidelines.
  • Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

Walkthrough

Two validation constraints were relaxed: the AzDevOpsProject class's SourceControlType property no longer enforces predefined values ('Git', 'Tfvc') through ValidateSet, and the Test-AzDevOpsPat function removes the length check requirement for PAT validation.

Changes

Cohort / File(s) Summary
Validation constraint relaxation
source/Classes/010.AzDevOpsProject.ps1, source/Modules/AzureDevOpsDsc.Common/Resources/Functions/Private/Test-AzDevOpsPat.ps1
SourceControlType property ValidateSet attribute commented out, disabling enforcement of 'Git' and 'Tfvc' values. Test-AzDevOpsPat function length check (52 characters) removed from PAT validation logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix DSC 3.0 for resources' is vague and generic, using non-descriptive terms that don't convey specific meaningful information about the actual changes (ValidateSet removal and PAT length check modification). Clarify the title to be more specific about the actual changes, such as 'Remove ValidateSet validation and PAT length check for DSC 3.0 compatibility' or reference the specific components being fixed.
Description check ❓ Inconclusive The PR description contains only the repository template and unchecked task checklist with no actual description of the changes, issues being fixed, or rationale for the modifications. Replace the template placeholders with a concrete description of what was changed and why, explain how these changes fix DSC 3.0 compatibility, and provide a CHANGELOG entry.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@source/Modules/AzureDevOpsDsc.Common/Resources/Functions/Private/Test-AzDevOpsPat.ps1`:
- Line 39: Update the comment-based help for Test-AzDevOpsPat (in
Test-AzDevOpsPat.ps1) to state that the function only validates that the PAT is
non-empty/non-whitespace (not its length or format), and then update the test
definitions in CommonTestCases.psm1 (the PAT cases around the 222-233 block) to
treat any non-empty string as valid (remove the 52-character exact-length
restriction) so tests match the implementation; alternatively, if DSC 3.0
requires format validation, restore the length/format check inside
Test-AzDevOpsPat instead and keep the tests as-is—pick one of these two paths
and make the help, implementation (Test-AzDevOpsPat) and test data
(CommonTestCases.psm1) consistent.
🧹 Nitpick comments (3)
source/Modules/AzureDevOpsDsc.Common/Resources/Functions/Private/Test-AzDevOpsPat.ps1 (1)

1-22: Consider completing comment-based help sections.

The comment-based help is missing .DESCRIPTION (should be 40+ chars per guidelines), .INPUTS, and .OUTPUTS sections. Since this is an existing file with a minor change, this can be addressed in a future PR.

source/AzureDevOpsDsc.psd1 (2)

5-5: Property naming inconsistency.

moduleVersion uses camelCase while other manifest properties use PascalCase (e.g., RootModule, CompanyName). Consider using ModuleVersion for consistency.

♻️ Suggested fix
-    moduleVersion        = '0.3.0'
+    ModuleVersion        = '0.3.0'

46-46: Extra blank line.

There are two consecutive blank lines between NestedModules and DscResourcesToExport. One blank line would be sufficient for separation.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@source/Classes/010.AzDevOpsProject.ps1`:
- Around line 39-41: Remove the commented-out ValidateSet line for the
SourceControlType property (the "[ValidateSet('Git', 'Tfvc')]" comment) and, if
you still need to enforce allowed values, implement runtime validation in the
class's AssertProperties() or NormalizeProperties() method: check that the
SourceControlType property is either "Git" or "Tfvc" and throw/normalize
accordingly. This keeps the property declaration clean and moves schema
enforcement to AssertProperties()/NormalizeProperties() as suggested.

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