Skip to content

Commit eca9d16

Browse files
committed
remove unused error handling
1 parent 9ddf215 commit eca9d16

File tree

1 file changed

+15
-28
lines changed

1 file changed

+15
-28
lines changed

api/ruby/find-inactive-members/find_inactive_members.rb

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require 'optparse'
44
require 'optparse/date'
55

6-
76
class InactiveMemberSearch
87
attr_accessor :organization, :members, :repositories, :date, :unrecognized_authors
98

@@ -129,46 +128,34 @@ def commit_activity(repo)
129128

130129
def issue_activity(repo, date=@date)
131130
# get all issues after specified date and iterate
132-
info "...issues"
133-
begin
134-
@client.list_issues(repo, { :since => date }).each do |issue|
135-
# if creator is a member of the org and not active, make active
136-
if t = @members.find {|member| member[:login] == issue["user"]["login"] && member[:active] == false }
137-
make_active(t[:login])
138-
end
131+
info "...Issues"
132+
@client.list_issues(repo, { :since => date }).each do |issue|
133+
# if creator is a member of the org and not active, make active
134+
if t = @members.find {|member| member[:login] == issue["user"]["login"] && member[:active] == false }
135+
make_active(t[:login])
139136
end
140-
rescue
141-
info "... no issues to check"
142137
end
143138
end
144139

145140
def issue_comment_activity(repo, date=@date)
146141
# get all issue comments after specified date and iterate
147-
info "...issue comments"
148-
begin
149-
@client.issues_comments(repo, { :since => date}).each do |comment|
150-
# if commenter is a member of the org and not active, make active
151-
if t = @members.find {|member| member[:login] == comment["user"]["login"] && member[:active] == false }
152-
make_active(t[:login])
153-
end
142+
info "...Issue comments"
143+
@client.issues_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])
154147
end
155-
rescue
156-
info "...no issues comments to check"
157148
end
158149
end
159150

160151
def pr_activity(repo, date=@date)
161152
# get all pull request comments comments after specified date and iterate
162-
info "...pr comments"
163-
begin
164-
@client.pull_requests_comments(repo, { :since => date}).each do |comment|
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
153+
info "...Pull Request comments"
154+
@client.pull_requests_comments(repo, { :since => date}).each do |comment|
155+
# if commenter is a member of the org and not active, make active
156+
if t = @members.find {|member| member[:login] == comment["user"]["login"] && member[:active] == false }
157+
make_active(t[:login])
169158
end
170-
rescue
171-
info "...no pr comments to check"
172159
end
173160
end
174161

0 commit comments

Comments
 (0)