File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/GitVersion.Configuration Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,18 @@ namespace GitVersion.Configuration;
44
55internal record IgnoreConfiguration : IIgnoreConfiguration
66{
7+ [ JsonIgnore ]
8+ public DateTimeOffset ? Before { get ; init ; }
9+
710 [ JsonPropertyName ( "commits-before" ) ]
811 [ JsonPropertyDescription ( "Commits before this date will be ignored. Format: yyyy-MM-ddTHH:mm:ss." ) ]
912 [ JsonPropertyFormat ( Format . DateTime ) ]
10- public DateTimeOffset ? Before { get ; init ; }
13+ public string ? BeforeString
14+ {
15+ get => Before ? . ToString ( "yyyy-MM-ddTHH:mm:ssZ" ) ;
16+ // if TryParse returns false, Before = null and the parse error is suppressed. How should the user be informed of parse errors?
17+ init => Before = value is null ? null : DateTimeOffset . TryParse ( value , out DateTimeOffset dto ) ? dto : null ;
18+ }
1119
1220 [ JsonIgnore ]
1321 IReadOnlyCollection < string > IIgnoreConfiguration . Shas => Shas ;
You can’t perform that action at this time.
0 commit comments