File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
api/ruby/find-inactive-members Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,10 @@ def issue_activity(repo, date=@date)
134
134
# get all issues after specified date and iterate
135
135
info "...Issues"
136
136
@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
137
141
# if creator is a member of the org and not active, make active
138
142
if t = @members . find { |member | member [ :login ] == issue [ "user" ] [ "login" ] && member [ :active ] == false }
139
143
make_active ( t [ :login ] )
@@ -145,6 +149,10 @@ def issue_comment_activity(repo, date=@date)
145
149
# get all issue comments after specified date and iterate
146
150
info "...Issue comments"
147
151
@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
148
156
# if commenter is a member of the org and not active, make active
149
157
if t = @members . find { |member | member [ :login ] == comment [ "user" ] [ "login" ] && member [ :active ] == false }
150
158
make_active ( t [ :login ] )
You can’t perform that action at this time.
0 commit comments