File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ contributors_file*
107107# #documentation
108108scripts /sort_contibutors /.env
109109scripts /sort_contibutors /contributors_file. *
110+ scripts /sort_contibutors /.tools /
111+ scripts /sort_contibutors /bin /
110112
111113# optimizations
112114.github /scripts /binary_version.txt
Original file line number Diff line number Diff line change 2525 $(GO ) vet ./...
2626
2727security :
28- @command -v gosec > /dev/null 2>&1 || { \
28+ @if command -v gosec > /dev/null 2>&1 ; then \
29+ gosec ./...; \
30+ else \
2931 echo " gosec not found. Installing with: go install github.com/securego/gosec/v2/cmd/gosec@latest" ; \
3032 GOBIN=$$(pwd ) /.tools $(GO ) install github.com/securego/gosec/v2/cmd/gosec@latest || exit 1; \
3133 PATH=$$(pwd ) /.tools:$$ PATH gosec ./...; \
32- exit $$? ; \
33- }
34- gosec ./...
34+ fi
3535
3636clean :
3737 rm -rf $(BUILD_DIR ) .tools
Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ var excludedContributors = map[string]struct{}{
6767 "commjoen" : {},
6868 "bendehaan" : {},
6969 "benno001" : {},
70+ "copilot" : {},
71+ "copilot-swe-agent" : {},
7072}
7173
7274var knownNames = map [string ]string {
Original file line number Diff line number Diff line change @@ -147,3 +147,23 @@ func TestWriteFile(t *testing.T) {
147147 t .Fatalf ("unexpected file content: %s" , string (b ))
148148 }
149149}
150+
151+ func TestParseContributorListExcludesAutomatedAccounts (t * testing.T ) {
152+ t .Parallel ()
153+
154+ a := & app {nameCache : map [string ]string {}}
155+ input := []contributorAPI {
156+ {Login : "some[bot]" , Contributions : 10 },
157+ {Login : "copilot" , Contributions : 10 },
158+ {Login : "copilot-swe-agent" , Contributions : 10 },
159+ {Login : "f3rn0s" , Contributions : 5 },
160+ }
161+
162+ got := a .parseContributorList (input )
163+ if len (got ) != 1 {
164+ t .Fatalf ("expected 1 contributor after filtering, got %d" , len (got ))
165+ }
166+ if got [0 ].Username != "f3rn0s" {
167+ t .Fatalf ("expected f3rn0s to remain, got %+v" , got [0 ])
168+ }
169+ }
You can’t perform that action at this time.
0 commit comments