-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from BertCotton/RemoveCompletedPRs
Remove completed p rs
- Loading branch information
Showing
104 changed files
with
1,063 additions
and
530 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
28 changes: 10 additions & 18 deletions
28
src/TfsAdvanced.DataStore/Repository/JobRequestRepository.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,27 @@ | ||
using System; | ||
using System.Collections.Concurrent; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using TfsAdvanced.Models.JobRequests; | ||
using TFSAdvanced.DataStore.Repository; | ||
using TFSAdvanced.Models.DTO; | ||
|
||
namespace TfsAdvanced.DataStore.Repository | ||
{ | ||
public class JobRequestRepository | ||
public class JobRequestRepository : RepositoryBase<QueueJob> | ||
{ | ||
private ConcurrentBag<JobRequest> jobRequests; | ||
|
||
public JobRequestRepository() | ||
{ | ||
this.jobRequests = new ConcurrentBag<JobRequest>(); | ||
} | ||
|
||
public IList<JobRequest> GetJobRequests(DateTime? fromDate = null, DateTime? toDate = null) | ||
public IEnumerable<QueueJob> GetJobRequests(DateTime? fromDate = null, DateTime? toDate = null) | ||
{ | ||
if(fromDate.HasValue && toDate.HasValue) | ||
return jobRequests.Where(x => x.queueTime >= fromDate.Value && x.queueTime <= toDate.Value).ToList(); | ||
return base.GetList(x => x.QueuedTime >= fromDate.Value && x.QueuedTime <= toDate.Value); | ||
if (fromDate.HasValue) | ||
return jobRequests.Where(x => x.queueTime >= fromDate.Value).ToList(); | ||
return base.GetList(x => x.QueuedTime >= fromDate.Value); | ||
if(toDate.HasValue) | ||
return jobRequests.Where(x => x.queueTime <= toDate.Value).ToList(); | ||
return base.GetList(x => x.QueuedTime <= toDate.Value); | ||
|
||
return jobRequests.ToList(); | ||
return GetAll(); | ||
} | ||
|
||
public void UpdateJobRequests(IList<JobRequest> jobRequests) | ||
protected override int GetId(QueueJob item) | ||
{ | ||
this.jobRequests = new ConcurrentBag<JobRequest>(jobRequests); | ||
return item.RequestId; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
17 changes: 17 additions & 0 deletions
17
src/TfsAdvanced.DataStore/Repository/ReleaseDefinitionRepository.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using TFSAdvanced.Models.DTO; | ||
|
||
namespace TFSAdvanced.DataStore.Repository | ||
{ | ||
public class ReleaseDefinitionRepository : RepositoryBase<ReleaseDefinition> | ||
{ | ||
protected override int GetId(ReleaseDefinition item) | ||
{ | ||
return item.Id; | ||
} | ||
|
||
public ReleaseDefinition GetReleaseDefinition(int id) | ||
{ | ||
return Get(definition => definition.Id == id); | ||
} | ||
} | ||
} |
This file contains 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
16 changes: 9 additions & 7 deletions
16
src/TfsAdvanced.DataStore/Repository/RepositoryRepository.cs
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
|
||
namespace TFSAdvanced.Models.DTO | ||
{ | ||
public class Build | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string Folder { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
public User Creator { get; set; } | ||
|
||
public Repository Repository { get; set; } | ||
|
||
public string SourceCommit { get; set; } | ||
|
||
public BuildStatus BuildStatus { get; set; } | ||
|
||
public DateTime QueuedDate { get; set; } | ||
|
||
public DateTime? StartedDate { get; set; } | ||
|
||
public DateTime? FinishedDate { get; set; } | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace TFSAdvanced.Models.DTO | ||
{ | ||
public class BuildDefinition | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
public int QueueId { get; set; } | ||
|
||
public Repository Repository { get; set; } | ||
|
||
public string Folder { get; set; } | ||
|
||
public string DefaultBranch { get; set; } | ||
} | ||
} |
Oops, something went wrong.