File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
src/GitLabApiClient/Models/Pipelines Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,21 @@ protected override void BuildCore(PipelineQueryOptions options)
4545 {
4646 Add ( "sort" , "asc" ) ;
4747 }
48+
49+ if ( options . UpdatedAfter . HasValue )
50+ {
51+ Add ( "updated_after" , options . UpdatedAfter . Value ) ;
52+ }
53+
54+ if ( options . UpdatedBefore . HasValue )
55+ {
56+ Add ( "updated_before" , options . UpdatedBefore . Value ) ;
57+ }
58+
59+ if ( ! options . TriggeredBy . IsNullOrEmpty ( ) )
60+ {
61+ Add ( "username" , options . TriggeredBy ) ;
62+ }
4863 }
4964
5065 #endregion
Original file line number Diff line number Diff line change 1+ using System ;
2+
13namespace GitLabApiClient . Models . Pipelines . Requests
24{
35 public class PipelineQueryOptions
@@ -38,5 +40,20 @@ internal PipelineQueryOptions() { }
3840 /// Sort pipelines in asc or desc order (default: desc)
3941 /// </summary>
4042 public SortOrder SortOrder { get ; set ; } = SortOrder . Descending ;
43+
44+ /// <summary>
45+ /// Return pipelines updated after the specified date.
46+ /// </summary>
47+ public DateTime ? UpdatedAfter { get ; set ; }
48+
49+ /// <summary>
50+ /// Return pipelines updated before the specified date
51+ /// </summary>
52+ public DateTime ? UpdatedBefore { get ; set ; }
53+
54+ /// <summary>
55+ /// The username of the user who triggered pipelines
56+ /// </summary>
57+ public string TriggeredBy { get ; set ; }
4158 }
4259}
Original file line number Diff line number Diff line change @@ -19,5 +19,11 @@ public class Pipeline
1919
2020 [ JsonProperty ( "web_url" ) ]
2121 public Uri WebUrl { get ; set ; }
22+
23+ [ JsonProperty ( "created_at" ) ]
24+ public DateTime CreatedAt { get ; set ; }
25+
26+ [ JsonProperty ( "updated_at" ) ]
27+ public DateTime UpdatedAt { get ; set ; }
2228 }
2329}
You can’t perform that action at this time.
0 commit comments