@@ -82,7 +82,7 @@ def organization_members
82
82
# get all organization members and place into an array of hashes
83
83
info "Finding #{ @organization } members "
84
84
@members = @client . organization_members ( @organization ) . collect do |m |
85
- email =
85
+ email =
86
86
{
87
87
login : m [ "login" ] ,
88
88
email : member_email ( m [ :login ] ) ,
@@ -136,30 +136,40 @@ def commit_activity(repo)
136
136
def issue_activity ( repo , date = @date )
137
137
# get all issues after specified date and iterate
138
138
info "...Issues"
139
- @client . list_issues ( repo , { :since => date } ) . each do |issue |
140
- # if there's no user (ghost user?) then skip this // THIS NEEDS BETTER VALIDATION
141
- if issue [ "user" ] . nil?
142
- next
143
- end
144
- # if creator is a member of the org and not active, make active
145
- if t = @members . find { |member | member [ :login ] == issue [ "user" ] [ "login" ] && member [ :active ] == false }
146
- make_active ( t [ :login ] )
139
+ begin
140
+ @client . list_issues ( repo , { :since => date } ) . each do |issue |
141
+ # if there's no user (ghost user?) then skip this // THIS NEEDS BETTER VALIDATION
142
+ if issue [ "user" ] . nil?
143
+ next
144
+ end
145
+ # if creator is a member of the org and not active, make active
146
+ if t = @members . find { |member | member [ :login ] == issue [ "user" ] [ "login" ] && member [ :active ] == false }
147
+ make_active ( t [ :login ] )
148
+ end
147
149
end
150
+ rescue Octokit ::NotFound
151
+ #API responds with a 404 (instead of an empty set) when repo is a private fork for security advisories
152
+ info "...no access to issues in this repo ..."
148
153
end
149
154
end
150
155
151
156
def issue_comment_activity ( repo , date = @date )
152
157
# get all issue comments after specified date and iterate
153
158
info "...Issue comments"
154
- @client . issues_comments ( repo , { :since => date } ) . each do |comment |
155
- # if there's no user (ghost user?) then skip this // THIS NEEDS BETTER VALIDATION
156
- if comment [ "user" ] . nil?
157
- next
158
- end
159
- # if commenter is a member of the org and not active, make active
160
- if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
161
- make_active ( t [ :login ] )
159
+ begin
160
+ @client . issues_comments ( repo , { :since => date } ) . each do |comment |
161
+ # if there's no user (ghost user?) then skip this // THIS NEEDS BETTER VALIDATION
162
+ if comment [ "user" ] . nil?
163
+ next
164
+ end
165
+ # if commenter is a member of the org and not active, make active
166
+ if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
167
+ make_active ( t [ :login ] )
168
+ end
162
169
end
170
+ rescue Octokit ::NotFound
171
+ #API responds with a 404 (instead of an empty set) when repo is a private fork for security advisories
172
+ info "...no access to issue comments in this repo ..."
163
173
end
164
174
end
165
175
0 commit comments