@@ -118,33 +118,45 @@ def commit_activity(repository)
118
118
def issue_activity ( repo , date = @date )
119
119
# get all issues after specified date and iterate
120
120
info "...issues"
121
- @client . list_issues ( repo , { :since => date } ) . each do |issue |
122
- # if creator is a member of the org and not active, make active
123
- if t = @members . find { |member | member [ :login ] == issue [ "user" ] [ "login" ] && member [ :active ] == false }
124
- make_active ( t [ :login ] )
121
+ begin
122
+ @client . list_issues ( repo , { :since => date } ) . each do |issue |
123
+ # if creator is a member of the org and not active, make active
124
+ if t = @members . find { |member | member [ :login ] == issue [ "user" ] [ "login" ] && member [ :active ] == false }
125
+ make_active ( t [ :login ] )
126
+ end
125
127
end
128
+ rescue
129
+ info "... no issues to check"
126
130
end
127
131
end
128
132
129
133
def issue_comment_activity ( repo , date = @date )
130
134
# get all issue comments after specified date and iterate
131
135
info "...issue comments"
132
- @client . issues_comments ( repo , { :since => date } ) . each do |comment |
133
- # if commenter is a member of the org and not active, make active
134
- if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
135
- make_active ( t [ :login ] )
136
+ begin
137
+ @client . issues_comments ( repo , { :since => date } ) . each do |comment |
138
+ # if commenter is a member of the org and not active, make active
139
+ if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
140
+ make_active ( t [ :login ] )
141
+ end
136
142
end
143
+ rescue
144
+ info "...no issues comments to check"
137
145
end
138
146
end
139
147
140
148
def pr_activity ( repo , date = @date )
141
149
# get all pull request comments comments after specified date and iterate
142
150
info "...pr comments"
143
- @client . pull_requests_comments ( repo , { :since => date } ) . each do |comment |
144
- # if commenter is a member of the org and not active, make active
145
- if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
146
- make_active ( t [ :login ] )
151
+ begin
152
+ @client . pull_requests_comments ( repo , { :since => date } ) . each do |comment |
153
+ # if commenter is a member of the org and not active, make active
154
+ if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
155
+ make_active ( t [ :login ] )
156
+ end
147
157
end
158
+ rescue
159
+ info "...no pr comments to check"
148
160
end
149
161
end
150
162
0 commit comments