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 @@ -134,6 +134,10 @@ def issue_activity(repo, date=@date)
134134 # get all issues after specified date and iterate
135135 info "...Issues"
136136 @client . list_issues ( repo , { :since => date } ) . each do |issue |
137+ # if there's no user (ghost user?) then skip this // THIS NEEDS BETTER VALIDATION
138+ if comment [ "user" ] . nil?
139+ next
140+ end
137141 # if creator is a member of the org and not active, make active
138142 if t = @members . find { |member | member [ :login ] == issue [ "user" ] [ "login" ] && member [ :active ] == false }
139143 make_active ( t [ :login ] )
@@ -145,6 +149,10 @@ def issue_comment_activity(repo, date=@date)
145149 # get all issue comments after specified date and iterate
146150 info "...Issue comments"
147151 @client . issues_comments ( repo , { :since => date } ) . each do |comment |
152+ # if there's no user (ghost user?) then skip this // THIS NEEDS BETTER VALIDATION
153+ if comment [ "user" ] . nil?
154+ next
155+ end
148156 # if commenter is a member of the org and not active, make active
149157 if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
150158 make_active ( t [ :login ] )
You can’t perform that action at this time.
0 commit comments