Repository navigation
Standardize Evergreen release dates as invariant date strings - #949
Merged
Merged
Conversation
Change ConvertTo-DateTime to return yyyy-MM-dd strings instead of DateTime objects, omitting time components. Update help, output metadata, and tests to reflect the culture-independent output.
Adds a Pester test to Get-EvergreenApp.Tests.ps1 asserting that any optional Date property in app output is a string in yyyy-MM-dd format. The test is skipped when retrieval fails, no output is returned, or the app does not emit a Date property. Also suppresses PSAvoidUsingConvertToSecureStringWithPlainText for the test file.
Target PowerShell 7.4 and .NET 8 on Windows and Ubuntu 22.04, retaining Windows PowerShell 5.1 compatibility checks.
Add test-only PSScriptAnalyzer suppressions for PSAvoidUsingConvertToSecureStringWithPlainText across seven test files.
Use lowercase `$true` and `$false` literals in the export script and tests for consistent PowerShell style.
Add dd/MM/yyyy HH:mm parsing to ConvertTo-DateTime with a matching test case.
Remove explicit date patterns from Codeberg, GitLab, JetBrains, and Oracle Java helpers. Normalize Microsoft fwlink dates through ConvertTo-DateTime.
Verify Date values are yyyy-MM-dd strings across shared helpers, accounting for local timezone conversion where applicable. Update GitLab mocks and assert source timestamp conversion.
Add a Date alias and a two-digit 12-hour time format to ConvertTo-DateTime, with midnight test coverage. Return the resolved fwlink date directly instead of converting it.
Test Results 6 files ± 0 2 374 suites ±0 6m 47s ⏱️ - 2m 24s Results for commit 11f6223. ± Comparison against base commit eb45080. This pull request removes 188 and adds 215 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Co-authored-by: aaronparker <8227455+aaronparker@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change makes release Date values consistent across Evergreen by returning invariant
yyyy-MM-ddstrings instead of culture-dependent DateTime objects. This change is intended to make theDateproperty output more consistent across applications. See #942Warning
ConvertTo-DateTimenow returns a string rather than a DateTime object. Users relying on the previous return type should account for this change.Changes
ConvertTo-DateTimeto return an invariantyyyy-MM-ddstring, add the Date parameter alias, and support additional 12- and 24-hour time formats.Get-CodebergRepoRelease,Get-GitLabRepoRelease,Get-JetBrainsApp, andGet-OracleJavaby using the shared auto-detection behavior.Get-EvergreenAppand shared-function tests, including Microsoft fwlink dates.