File tree Expand file tree Collapse file tree
api/ruby/find-inactive-members Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,15 +114,19 @@ def make_active(login)
114114 def commit_activity ( repo )
115115 # get all commits after specified date and iterate
116116 info "...commits"
117- @client . commits_since ( repo , @date ) . each do |commit |
118- # if commmitter is a member of the org and not active, make active
119- if commit [ "author" ] . nil?
120- add_unrecognized_author ( commit [ :commit ] [ :author ] )
121- next
122- end
123- if t = @members . find { |member | member [ :login ] == commit [ "author" ] [ "login" ] && member [ :active ] == false }
124- make_active ( t [ :login ] )
117+ begin
118+ @client . commits_since ( repo , @date ) . each do |commit |
119+ # if commmitter is a member of the org and not active, make active
120+ if commit [ "author" ] . nil?
121+ add_unrecognized_author ( commit [ :commit ] [ :author ] )
122+ next
123+ end
124+ if t = @members . find { |member | member [ :login ] == commit [ "author" ] [ "login" ] && member [ :active ] == false }
125+ make_active ( t [ :login ] )
126+ end
125127 end
128+ rescue Octokit ::Conflict
129+ info "...no commits"
126130 end
127131 end
128132
You can’t perform that action at this time.
0 commit comments