You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When getting the first activity data via get.first.activity.data, using multiple activity types (activity.type = c("mails", "commits", "issues")),
we end up in an error when there is no activity for several of these activity types.
In particular, assume that there is no "mail" activity in the range data and no "commit" activity in the range data, but only "issue" activity. In such a case, when reducing activity.by.type, we get an error here:
In this case, both x ("mails") and y ("commits") are empty lists (list()) in the first step of the reduction, making the reduction fail as there are no names in x and y.
, and if so, return and empty list instead of combining the values for the keys. Disadvantage: When someone expects that there is a "commits" and "emails" named element in the resulting list for each developer, then this will lead to problems as there is no "commits" or "emails" element in the resulting list.
Preferred solution:
Make sure that the input lists for the reduction (i.e., x and y) are not empty. So, check before the reduction whether multiple lists in activity.by.type are empty, and if there are some, just copy one of the non-empty lists and set all its values to NA. Then reducing the lists should work without any problem and the resulting list in the end should have elements named "commits" and "emails" for each developer though commit data and e-mail data are empty.
Versions
This affects all versions in which the function get.first.activity.data exists.
The text was updated successfully, but these errors were encountered:
Description
When getting the first activity data via
get.first.activity.data
, using multiple activity types (activity.type = c("mails", "commits", "issues")
),we end up in an error when there is no activity for several of these activity types.
In particular, assume that there is no "mail" activity in the range data and no "commit" activity in the range data, but only "issue" activity. In such a case, when reducing
activity.by.type
, we get an error here:coronet/util-networks-covariates.R
Line 1031 in a656026
In this case, both
x
("mails") andy
("commits") are empty lists (list()
) in the first step of the reduction, making the reduction fail as there are no names inx
andy
.Solutions
Quick and dirty solution:
Check if
keys
isNULL
beforecoronet/util-networks-covariates.R
Line 1040 in a656026
Preferred solution:
Make sure that the input lists for the reduction (i.e.,
x
andy
) are not empty. So, check before the reduction whether multiple lists inactivity.by.type
are empty, and if there are some, just copy one of the non-empty lists and set all its values toNA
. Then reducing the lists should work without any problem and the resulting list in the end should have elements named "commits" and "emails" for each developer though commit data and e-mail data are empty.Versions
This affects all versions in which the function
get.first.activity.data
exists.The text was updated successfully, but these errors were encountered: