Closed m3talsmith closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
859f796
) 72.33% compared to head (b48438c
) 72.33%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
When getting
--json
output of a list of organization members, the entire list of members were duplicates of the last member found. The issue is this list where all entries were the duplicated member, rather than a list where all entries were unique members.The problem was that there was a for loop that was passing a pointer to a loop variable, to a function, where it was being used later; passing by reference. This meant that the only value used was the last value in the loop, as the value of the pointer changed with each iteration.
🔧 Changes
This PR passes the value of the member to the function, forcing a copy of the current iteration value, and preserving it from changes by the next iteration: pass by value.
📚 References
🔬 Testing
📝 Checklist