File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
using Microsoft . AspNetCore . Mvc ;
2
+ using System . Collections ;
3
+ using System . Collections . Generic ;
2
4
using System . ComponentModel . DataAnnotations ;
3
5
4
6
namespace Fritz . StreamTools . Models
@@ -15,7 +17,7 @@ public class GitHubConfiguration
15
17
[ Remote ( action : "VerifyRepository" , controller : "GitHub" , AdditionalFields = nameof ( RepositoryOwner ) ) ]
16
18
public string RepositoryName { get ; set ; }
17
19
18
- public string ExcludeUser { get ; set ; } = "csharpfritz" ;
20
+ public ICollection < string > ExcludeUsers { get ; set ; }
19
21
20
22
public string RepositoryCsv { get ; set ; } = "csharpfritz/Fritz.StreamTools,csharpfritz/CoreWiki" ;
21
23
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ private async Task<List<GitHubInformation>> FetchContributersFromGithub(string r
54
54
return outModel ;
55
55
}
56
56
model . TopEverContributors . AddRange (
57
- contributors . Where ( c => c . Total > 0 && c . Author . Login != Configuration . ExcludeUser )
57
+ contributors . Where ( c => c . Total > 0 && ! Configuration . ExcludeUsers . Contains ( c . Author . Login ) )
58
58
. OrderByDescending ( c => c . Total )
59
59
. Take ( 5 )
60
60
. Select ( c => new GitHubContributor ( )
@@ -71,7 +71,7 @@ private async Task<List<GitHubInformation>> FetchContributersFromGithub(string r
71
71
Commits = c . Weeks . Where ( w => w . Week >= lastMonth )
72
72
. Sum ( e => e . Commits )
73
73
} )
74
- . Where ( c => c . Commits > 0 && c . Author != Configuration . ExcludeUser )
74
+ . Where ( c => c . Commits > 0 && ! Configuration . ExcludeUsers . Contains ( c . Author ) )
75
75
. OrderByDescending ( c => c . Commits )
76
76
. Take ( 5 ) ) ;
77
77
model . TopWeekContributors . AddRange (
@@ -81,7 +81,7 @@ private async Task<List<GitHubInformation>> FetchContributersFromGithub(string r
81
81
Author = c . Author . Login ,
82
82
Commits = c . Weeks . Last ( ) . Commits
83
83
} )
84
- . Where ( c => c . Commits > 0 && c . Author != Configuration . ExcludeUser )
84
+ . Where ( c => c . Commits > 0 && ! Configuration . ExcludeUsers . Contains ( c . Author ) )
85
85
. OrderByDescending ( c => c . Commits )
86
86
. Take ( 5 ) ) ;
87
87
outModel . Add ( model ) ;
Original file line number Diff line number Diff line change 68
68
},
69
69
"GitHub" : {
70
70
"RepositoryName" : " Fritz.StreamTools" ,
71
- "RepositoryOwner" : " csharpfritz"
71
+ "RepositoryOwner" : " csharpfritz" ,
72
+ "ExcludeUsers" : [
73
+ " csharpfritz" ,
74
+ " dependabot"
75
+ ]
72
76
}
73
77
}
You can’t perform that action at this time.
0 commit comments