Skip to content

Commit 989d9d4

Browse files
author
Bastien Guerry
committed
src/consolidate-datacodegouvfr.clj: Refine score
1 parent 6db9a83 commit 989d9d4

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/consolidate-datacodegouvfr.clj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,30 @@
179179
;; Does the repo have a license?
180180
(if (:license files) high 0)
181181
;; Does the repo have a publiccode.yml file?
182-
(if (:publiccode files) medium 0)
183-
;; Does the repo have a CONTRIBUTING.md file?
184-
(if (:contributing files) medium 0)
182+
(if (:publiccode files) high 0)
185183
;; Is the repo a template?
186184
(if (:template v) (* medium 2) 0)
185+
;; Does the repo have a CONTRIBUTING.md file?
186+
(if (:contributing files) medium 0)
187187
;; Does the repo have a description?
188188
(if (not-empty (:description v)) 0 (- medium))
189189
;; Is the repo a fork?
190-
(if (:fork v) (- medium) 0)
190+
(if (:fork v) (- high) 0)
191191
;; Does the repo have many forks?
192192
(if-let [f (:forks_count v)]
193-
(condp < f 1000 high 100 medium 10 low 0)
193+
(condp < f
194+
1000 high
195+
100 medium
196+
10 low
197+
0)
194198
0)
195199
;; Does the repo have many subscribers?
196200
(if-let [f (:subscribers_count v)]
197-
(condp < f 100 high 10 medium 1 low 0)
201+
(condp < f
202+
100 high
203+
10 medium
204+
1 low
205+
0)
198206
0))))
199207

200208
;; Spit repositories.json

0 commit comments

Comments
 (0)