Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

History

History
History
112 lines (112 loc) 路 2.75 KB

File metadata and controls

112 lines (112 loc) 路 2.75 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
with contributions as (
select committer_id as actor_id,
dup_committer_login as actor,
event_id
from
gha_commits
where
committer_id is not null
and (lower(dup_committer_login) {{exclude_bots}})
union select author_id as actor_id,
dup_author_login as actor,
event_id
from
gha_commits
where
author_id is not null
and (lower(dup_author_login) {{exclude_bots}})
union select actor_id,
dup_actor_login as actor,
id as event_id
from
gha_events
where
type in (
'PushEvent', 'PullRequestEvent', 'IssuesEvent',
'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent'
)
and (lower(dup_actor_login) {{exclude_bots}})
), unknown_contributions as (
select distinct c.committer_id as actor_id,
c.dup_committer_login as actor,
c.event_id
from
gha_commits c
left join
gha_actors_affiliations aa
on
c.committer_id = aa.actor_id
where
c.committer_id is not null
and (lower(c.dup_committer_login) {{exclude_bots}})
and aa.actor_id is null
union select distinct c.author_id as actor_id,
c.dup_author_login as actor,
c.event_id
from
gha_commits c
left join
gha_actors_affiliations aa
on
c.author_id = aa.actor_id
where
c.author_id is not null
and (lower(c.dup_author_login) {{exclude_bots}})
and aa.actor_id is null
union select distinct e.actor_id,
e.dup_actor_login as actor,
e.id as event_id
from
gha_events e
left join
gha_actors_affiliations aa
on
e.actor_id = aa.actor_id
where
e.type in (
'PushEvent', 'PullRequestEvent', 'IssuesEvent',
'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent'
)
and (lower(e.dup_actor_login) {{exclude_bots}})
and aa.actor_id is null
), contributors as (
select actor,
count(distinct event_id) as contributions
from
contributions
group by
actor
order by
contributions desc
), unknown_contributors as (
select actor,
count(distinct event_id) as contributions
from
unknown_contributions
group by
actor
order by
contributions desc
), all_contributions as (
select sum(contributions) as cnt
from
contributors
)
select
row_number() over cumulative_contributions as rank_number,
c.actor,
c.contributions,
round((c.contributions * 100.0) / a.cnt, 5) as percent,
sum(c.contributions) over cumulative_contributions as cumulative_sum,
round((sum(c.contributions) over cumulative_contributions * 100.0) / a.cnt, 5) as cumulative_percent,
a.cnt as all_contributions
from
unknown_contributors c,
all_contributions a
window
cumulative_contributions as (
order by c.contributions desc, c.actor asc
range between unbounded preceding
and current row
)
;
Morty Proxy This is a proxified and sanitized view of the page, visit original site.