@@ -54,6 +54,47 @@ def commitfest_icon_class(summary)
5454 "fa-code-branch"
5555 end
5656
57+ def contributor_role_overlay ( contributor )
58+ return nil unless contributor &.respond_to? ( :contributor_type )
59+
60+ role_type = contributor . contributor_type
61+ return nil unless role_type
62+
63+ case role_type
64+ when "core_team"
65+ { type : role_type , icon : "fa-solid fa-people-group" , label : "Core Team" }
66+ when "committer"
67+ { type : role_type , icon : "fa-solid fa-code-branch" , label : "Committer" }
68+ when "major_contributor"
69+ { type : role_type , icon : "fa-solid fa-star" , label : "Major Contributor" }
70+ when "significant_contributor"
71+ { type : role_type , icon : "fa-solid fa-award" , label : "Significant Contributor" }
72+ when "past_major_contributor" , "past_significant_contributor"
73+ { type : role_type , icon : "fa-solid fa-clock-rotate-left" , label : "Past Contributor" }
74+ end
75+ end
76+
77+ def contributor_role_overlay_for_types ( types )
78+ types = Array ( types ) . compact
79+ return nil if types . empty?
80+
81+ role_type = types . min_by { |type | Alias ::CONTRIBUTOR_RANK [ type ] || 99 }
82+ return nil unless role_type
83+
84+ case role_type
85+ when "core_team"
86+ { type : role_type , icon : "fa-solid fa-people-group" , label : "Core Team" }
87+ when "committer"
88+ { type : role_type , icon : "fa-solid fa-code-branch" , label : "Committer" }
89+ when "major_contributor"
90+ { type : role_type , icon : "fa-solid fa-star" , label : "Major Contributor" }
91+ when "significant_contributor"
92+ { type : role_type , icon : "fa-solid fa-award" , label : "Significant Contributor" }
93+ when "past_major_contributor" , "past_significant_contributor"
94+ { type : role_type , icon : "fa-solid fa-clock-rotate-left" , label : "Past Contributor" }
95+ end
96+ end
97+
5798 def read_visibility_seconds
5899 5
59100 end
0 commit comments