hubstats 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +5 -0
- data/app/controllers/hubstats/repos_controller.rb +4 -2
- data/app/controllers/hubstats/users_controller.rb +0 -1
- data/app/helpers/hubstats/metrics_helper.rb +8 -1
- data/app/views/hubstats/partials/_header.html.erb +0 -2
- data/app/views/hubstats/partials/{_qa-signoffs-condensed.html.erb → _qa-signoff-condensed.html.erb} +5 -5
- data/app/views/hubstats/partials/_quick_stats_one.html.erb +0 -6
- data/app/views/hubstats/partials/_quick_stats_two.html.erb +1 -7
- data/app/views/hubstats/partials/_repo.html.erb +1 -7
- data/app/views/hubstats/partials/_user.html.erb +3 -7
- data/app/views/hubstats/repos/show.html.erb +6 -6
- data/app/views/hubstats/tables/_qa_signoffs_condensed.html.erb +2 -2
- data/app/views/hubstats/tables/_repos.html.erb +2 -4
- data/app/views/hubstats/tables/_users.html.erb +2 -5
- data/app/views/hubstats/teams/show.html.erb +3 -0
- data/app/views/hubstats/users/show.html.erb +1 -10
- data/lib/hubstats/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee68bdb6be4fcfe7732bb77d4234574172a1081c
|
4
|
+
data.tar.gz: 7b1aa1ee88453e1a3bd7c93fcb104e2757261f91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d71cd46f7288aa600de8b8262c6c671145dd0149134cb0d757d3deced803bc24caff337bb2f30660e6cd22ab9a31e4bf6cad3866b07bab08d54939b2dbbc7b
|
7
|
+
data.tar.gz: 31773307d4e3cdd228f76c955b7b15b230c93254681d3b69ea62423a8e28cbb5c980a9342d7e0b2b49e6230e2475619d148e49f6ccc65d0749af1bfa06251d15
|
data/CHANGELOG.markdown
CHANGED
@@ -36,7 +36,9 @@ module Hubstats
|
|
36
36
|
@deploys = Hubstats::Deploy.belonging_to_repo(@repo.id).deployed_in_date_range(@start_date, @end_date).order("deployed_at DESC").limit(20)
|
37
37
|
@deploy_count = Hubstats::Deploy.belonging_to_repo(@repo.id).deployed_in_date_range(@start_date, @end_date).count(:all)
|
38
38
|
@comment_count = Hubstats::Comment.belonging_to_repo(@repo.id).created_in_date_range(@start_date, @end_date).count(:all)
|
39
|
+
@users = Hubstats::User.with_pulls_or_comments_or_deploys(@start_date, @end_date, @repo.id).only_active.order("login ASC").limit(20)
|
39
40
|
@active_user_count = Hubstats::User.with_pulls_or_comments_or_deploys(@start_date, @end_date, @repo.id).only_active.length
|
41
|
+
@qa_signoff_count = Hubstats::QaSignoff.belonging_to_repo(@repo.id).signed_within_date_range(@start_date, @end_date).count(:all)
|
40
42
|
@net_additions = Hubstats::PullRequest.merged_in_date_range(@start_date, @end_date).belonging_to_repo(@repo.id).sum(:additions).to_i -
|
41
43
|
Hubstats::PullRequest.merged_in_date_range(@start_date, @end_date).belonging_to_repo(@repo.id).sum(:deletions).to_i
|
42
44
|
@additions = Hubstats::PullRequest.merged_in_date_range(@start_date, @end_date).belonging_to_repo(@repo.id).average(:additions)
|
@@ -53,9 +55,9 @@ module Hubstats
|
|
53
55
|
@deletions ||= 0
|
54
56
|
@stats_row_one = {
|
55
57
|
active_user_count: @active_user_count,
|
56
|
-
deploy_count: @deploy_count,
|
57
58
|
pull_count: @pull_count,
|
58
|
-
comment_count: @comment_count
|
59
|
+
comment_count: @comment_count,
|
60
|
+
qa_signoff_count: @qa_signoff_count
|
59
61
|
}
|
60
62
|
@stats_row_two = {
|
61
63
|
avg_additions: @additions.round.to_i,
|
@@ -36,6 +36,13 @@ module Hubstats
|
|
36
36
|
Hubstats::Comment.created_in_date_range(@start_date, @end_date).ignore_comments_by(Hubstats::User.ignore_users_ids).count(:all)
|
37
37
|
end
|
38
38
|
|
39
|
+
# Public - Gets the number of QA signoffs within the start date and end date
|
40
|
+
#
|
41
|
+
# Returns - the number of QA signoffs
|
42
|
+
def get_qa_signoff_count
|
43
|
+
Hubstats::QaSignoff.signed_within_date_range(@start_date, @end_date).count(:all)
|
44
|
+
end
|
45
|
+
|
39
46
|
# Public - Gets the number of comments per reviewer within the start date and end date
|
40
47
|
#
|
41
48
|
# Returns - the number of comments per reviewer
|
@@ -90,7 +97,7 @@ module Hubstats
|
|
90
97
|
developer_count: get_developer_count,
|
91
98
|
pull_count: get_pull_count,
|
92
99
|
pulls_per_dev: get_pulls_per_dev,
|
93
|
-
|
100
|
+
qa_signoff_count: get_qa_signoff_count,
|
94
101
|
net_additions: get_net_additions
|
95
102
|
}
|
96
103
|
@stats_row_two = {
|
@@ -23,8 +23,6 @@
|
|
23
23
|
<%= link_to "Teams", teams_path%></li>
|
24
24
|
<li class="<%='navbar-active' if params[:controller] == 'hubstats/users'%>">
|
25
25
|
<%= link_to "Users", users_path%></li>
|
26
|
-
<li class="<%='navbar-active' if params[:controller] == 'hubstats/deploys'%>">
|
27
|
-
<%= link_to "Deployments", deploys_path%></li>
|
28
26
|
<li class="<%='navbar-active' if params[:controller] == 'hubstats/pull_requests'%>">
|
29
27
|
<%= link_to "Pull Requests", root_path%></li>
|
30
28
|
<li>
|
data/app/views/hubstats/partials/{_qa-signoffs-condensed.html.erb → _qa-signoff-condensed.html.erb}
RENAMED
@@ -1,15 +1,15 @@
|
|
1
|
-
<div class="row single-
|
1
|
+
<div class="row single-pull">
|
2
2
|
<div class="user-image-small col-lg-1 col-md-1 col-sm-1 col-xs-2" >
|
3
|
-
<img src= <%= qa_signoff.user.avatar_url%> alt= <%= qa_signoff.user.login %> >
|
3
|
+
<img src= <%= qa_signoff.pull_request.user.avatar_url%> alt= <%= qa_signoff.pull_request.user.login %> >
|
4
4
|
</div>
|
5
5
|
|
6
6
|
<!-- Show the repo name and the specific qa_signoff request name and who made it when -->
|
7
|
-
|
7
|
+
<div class="pull-info col-lg-9 col-md-9 col-sm-9 col-xs-8">
|
8
8
|
<h4>
|
9
9
|
<%= link_to qa_signoff.repo.name, repo_path(qa_signoff.repo.name) %> /
|
10
10
|
<%= link_to qa_signoff.pull_request.title, qa_signoff.pull_request.html_url, :target => '_blank' %>
|
11
11
|
</h4>
|
12
|
-
by <%= link_to qa_signoff.user.login, user_path(qa_signoff.user) %>
|
12
|
+
by <%= link_to qa_signoff.pull_request.user.login, user_path(qa_signoff.pull_request.user) %>
|
13
13
|
<% if qa_signoff.pull_request.merged == '1'%>
|
14
14
|
<%= "merged #{time_ago_in_words(qa_signoff.pull_request.merged_at)} ago "%>
|
15
15
|
<% elsif qa_signoff.pull_request.state == 'closed' %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
<!-- Show the pull request number and a link to the github PR -->
|
23
23
|
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2" >
|
24
|
-
<div class="
|
24
|
+
<div class="pull-right">
|
25
25
|
<%= qa_signoff.pull_request.number %>
|
26
26
|
<span class="octicon octicon-mark-github"></span>
|
27
27
|
</span>
|
@@ -31,12 +31,6 @@
|
|
31
31
|
<h4> Pull Requests per Developer </h4>
|
32
32
|
</div>
|
33
33
|
<% end %>
|
34
|
-
<% if @stats_row_one.has_key? :deploy_count %>
|
35
|
-
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
36
|
-
<h1> <%= @stats_row_one[:deploy_count] %> </h1>
|
37
|
-
<h4> Deployments </h4>
|
38
|
-
</div>
|
39
|
-
<% end %>
|
40
34
|
<% if @stats_row_one.has_key? :comment_count %>
|
41
35
|
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
42
36
|
<h1><%= @stats_row_one[:comment_count] %> </h1>
|
@@ -31,12 +31,6 @@
|
|
31
31
|
<h4> Pull Requests per Developer </h4>
|
32
32
|
</div>
|
33
33
|
<% end %>
|
34
|
-
<% if @stats_row_two.has_key? :deploy_count %>
|
35
|
-
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
36
|
-
<h1> <%= @stats_row_two[:deploy_count] %> </h1>
|
37
|
-
<h4> Deployments </h4>
|
38
|
-
</div>
|
39
|
-
<% end %>
|
40
34
|
<% if @stats_row_two.has_key? :comment_count %>
|
41
35
|
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
42
36
|
<h1><%= @stats_row_two[:comment_count] %> </h1>
|
@@ -45,7 +39,7 @@
|
|
45
39
|
<% end %>
|
46
40
|
<% if @stats_row_two.has_key? :qa_signoff_count %>
|
47
41
|
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
48
|
-
<h1><%= @
|
42
|
+
<h1><%= @stats_row_two[:qa_signoff_count] %> </h1>
|
49
43
|
<h4> QA Signoffs </h4>
|
50
44
|
</div>
|
51
45
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="row single-repo">
|
2
2
|
|
3
3
|
<!-- Show the repo name and the date that it was last updated, with a link to the github repo -->
|
4
|
-
<div class="repo-info col-lg-
|
4
|
+
<div class="repo-info col-lg-4 col-md-4 col-sm-4 col-xs-8">
|
5
5
|
<h4>
|
6
6
|
<%= link_to repo.name, repo_path(repo)%>
|
7
7
|
</h4>
|
@@ -16,12 +16,6 @@
|
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<!-- Show all of the stats for the individual repo -->
|
19
|
-
<div class="col-lg-2 col-md-2 col-sm-2">
|
20
|
-
<div class="text-center">
|
21
|
-
<span class="text-large"><%= repo.deploy_count %></span>
|
22
|
-
<span class="mega-octicon octicon-rocket"></span>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
19
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
26
20
|
<div class="text-center">
|
27
21
|
<span class="text-large"><%= repo.pull_request_count %></span>
|
@@ -18,13 +18,9 @@
|
|
18
18
|
</h4>
|
19
19
|
</div>
|
20
20
|
|
21
|
+
<div class="col-lg-1 col-md-1 col-sm-1" ></div> <!-- Empty column just to make space -->
|
22
|
+
|
21
23
|
<!-- Show the basic stats for this user for this user -->
|
22
|
-
<div class="col-lg-2 col-md-2 col-sm-2">
|
23
|
-
<div class="text-center">
|
24
|
-
<span class="text-large"><%= user.deploy_count %></span>
|
25
|
-
<span class="mega-octicon octicon-rocket"></span>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
24
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
29
25
|
<div class="text-center">
|
30
26
|
<span class="text-large"><%= user.pull_request_count %></span>
|
@@ -44,7 +40,7 @@
|
|
44
40
|
</div>
|
45
41
|
</div>
|
46
42
|
|
47
|
-
<div class="col-lg-
|
43
|
+
<div class="col-lg-2 col-md-2 col-sm-2">
|
48
44
|
<div class="text-center">
|
49
45
|
<span class="text-large"><%= user.additions - user.deletions %></span>
|
50
46
|
</div>
|
@@ -26,12 +26,12 @@
|
|
26
26
|
<% end %>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<!-- Show all of the
|
30
|
-
<div class="col col-
|
31
|
-
<h3>
|
32
|
-
<%= render
|
33
|
-
<% if @
|
34
|
-
<p class="pull-right"
|
29
|
+
<!-- Show all of the active users that contribute to this repo users in a "condensed" view -->
|
30
|
+
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
31
|
+
<h3> Active Users </h3>
|
32
|
+
<%= render 'hubstats/tables/users_condensed' %>
|
33
|
+
<% if @active_user_count > 20 %>
|
34
|
+
<p class="pull-right">Hubstats is currently not set up to view all active users for this repository</p>
|
35
35
|
<% end %>
|
36
36
|
</div>
|
37
37
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!-- Show the QA Signoffs or say there are no signoffs available -->
|
2
2
|
<% if @qa_signoffs.length > 0 %>
|
3
|
-
<div class="
|
4
|
-
<%= render partial: 'hubstats/partials/qa-
|
3
|
+
<div class="pulls">
|
4
|
+
<%= render partial: 'hubstats/partials/qa-signoff-condensed', collection: @qa_signoffs, as: :qa_signoff %>
|
5
5
|
</div>
|
6
6
|
<% else %>
|
7
7
|
<p> No QA signoff information available</p>
|
@@ -2,12 +2,10 @@
|
|
2
2
|
<% if @repos.length > 0 %>
|
3
3
|
<div class="repos">
|
4
4
|
<div class="row single-repo header">
|
5
|
-
<div class="col-lg-
|
5
|
+
<div class="col-lg-3 col-md-3 col-sm-3">
|
6
6
|
<a class="header desc" id="name"> Repository Name <span class="octicon"></span> </a>
|
7
7
|
</div>
|
8
|
-
<div class="col-lg-
|
9
|
-
<a class="header desc" id="deploys"> Deployments <span class="octicon"></span> </a>
|
10
|
-
</div>
|
8
|
+
<div class="col-lg-1 col-md-1 col-sm-1" ></div> <!-- Empty column just to make space -->
|
11
9
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
12
10
|
<a class="header desc" id="pulls"> Merged Pull Requests <span class="octicon"></span> </a>
|
13
11
|
</div>
|
@@ -2,12 +2,9 @@
|
|
2
2
|
<% if @users.length > 0 %>
|
3
3
|
<div class="users">
|
4
4
|
<div class="row single-user header">
|
5
|
-
<div class="col-lg-
|
5
|
+
<div class="col-lg-4 col-md-4 col-sm-4">
|
6
6
|
<a class="header desc" id="name"> GitHub Username <span class="octicon"></span> </a>
|
7
7
|
</div>
|
8
|
-
<div class="col-lg-2 col-md-2 col-sm-2">
|
9
|
-
<a class="header desc" id="deploys"> Deployments <span class="octicon"></span> </a>
|
10
|
-
</div>
|
11
8
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
12
9
|
<a class="header desc" id="pulls"> Merged Pull Requests <span class="octicon"></span> </a>
|
13
10
|
</div>
|
@@ -17,7 +14,7 @@
|
|
17
14
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
18
15
|
<a class="header desc" id="signoffs"> QA Signoffs <span class="octicon"></span></a>
|
19
16
|
</div>
|
20
|
-
<div class="col-lg-
|
17
|
+
<div class="col-lg-2 col-md-2 col-sm-2">
|
21
18
|
<a class="header desc" id="netadditions"> Net Additions <span class="octicon"></span></a>
|
22
19
|
</div>
|
23
20
|
</div>
|
@@ -30,6 +30,9 @@
|
|
30
30
|
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
31
31
|
<h3> Active Users </h3>
|
32
32
|
<%= render 'hubstats/tables/users_condensed' %>
|
33
|
+
<% if @active_user_count > 20 %>
|
34
|
+
<p class="pull-right">Hubstats is currently not set up to view all active users for this team</p>
|
35
|
+
<% end %>
|
33
36
|
</div>
|
34
37
|
</div>
|
35
38
|
</div>
|
@@ -36,21 +36,12 @@
|
|
36
36
|
<% end %>
|
37
37
|
</div>
|
38
38
|
|
39
|
-
<!-- Show all of this user's deploys in a "condensed" view -->
|
40
|
-
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
41
|
-
<h3> Deployments </h3>
|
42
|
-
<%= render 'hubstats/tables/deploys_condensed' %>
|
43
|
-
<% if @deploy_count > 20 %>
|
44
|
-
<p class="pull-right"><%= link_to "View All", deploys_path(:users => @user.id) %></p>
|
45
|
-
<% end %>
|
46
|
-
</div>
|
47
|
-
|
48
39
|
<!-- Show all of this user's QA Signoffs in a "condensed" view -->
|
49
40
|
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
50
41
|
<h3> QA Signoffs </h3>
|
51
42
|
<%= render 'hubstats/tables/qa_signoffs_condensed' %>
|
52
43
|
<% if @qa_signoff_count > 20 %>
|
53
|
-
<p class="pull-right">Hubstats is currently not set up to
|
44
|
+
<p class="pull-right">Hubstats is currently not set up to view all QA signoffs for this user</p>
|
54
45
|
<% end %>
|
55
46
|
</div>
|
56
47
|
</div>
|
data/lib/hubstats/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubstats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Hursh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -255,7 +255,7 @@ files:
|
|
255
255
|
- app/views/hubstats/partials/_header.html.erb
|
256
256
|
- app/views/hubstats/partials/_pull-condensed.html.erb
|
257
257
|
- app/views/hubstats/partials/_pull.html.erb
|
258
|
-
- app/views/hubstats/partials/_qa-
|
258
|
+
- app/views/hubstats/partials/_qa-signoff-condensed.html.erb
|
259
259
|
- app/views/hubstats/partials/_quick_stats_one.html.erb
|
260
260
|
- app/views/hubstats/partials/_quick_stats_two.html.erb
|
261
261
|
- app/views/hubstats/partials/_repo.html.erb
|