I used to write code in my free time before I married and had kids. I used to do a lot of stuff in my free time before then.
For a self-insured employer, the fact that I have a family makes me more expensive to employ. Hiring only young, single males or young, single, and sterile females allows them to raise base salary offers without inflating total compensation.
But they are not allowed by law to use the size of my family against me in the hiring process. Technically. Practically speaking, they do it anyway, and the law is unenforceable. If there's a potential legal problem, it's easy to fall back on the "not a good cultural fit" cushion.
If you don't expect someone to be contributing to their github repo on the clock, on your dime, don't check it as a criterion for employment.
I think that we should expect employers to allow open source contributions where it is appropriate. Breaking out general purpose stuff into libraries is more maintainable code anyway. If your current employer is hurting your career prospects, you should quit.
I'm not really concerned about whatever supposed "hidden biases" there are in open source, the simple fact is that the best way to judge someone's work is to see it.
If you're concerned about hidden biases I would direct you to the status quo brainteasers used today, where the interviewer simply has a blank slate to project whatever personal biases they have onto the candidate in a highly subjective, highly unrealistic situation that has nothing to do with actual programming.
That's why orchestra companies will conduct blind auditions rather than check a musician's SoundCloud portfolio.
If you want to see someone's actual work, you will have to simulate as closely as possible, in a controlled and repeatable fashion, the conditions under which that person will be doing work for you.
If you're looking for a cello player, you don't watch YouTube videos of musicians tap dancing, making trick shots in billiards, sawing lumber by hand, or performing close-up magic tricks. You number them, sit them down behind a visual barrier, and listen to each of them play the same piece of music. Then you pick the number that played it the best and hire that person.
Pulling back from that metaphor a bit, software professionals don't play just one instrument, or one genre of music. We know multiple high level languages, use different framework tools, use different design patterns, follow different processes, and the only thing we really all have in common is the ability to take a large, human-sized task and break it down into tiny, specific instructions simple enough for a stupid electronic machine to carry out--the paths between origin and destination being uncountably varied, and the ones chosen being largely a matter of arbitrary choices or aesthetic preferences.
If you won't consider anyone that does not have a public portfolio, you are inviting the obvious countermeasure of creating a sham portfolio just to jump through your hoop. You are encouraging people to write code that advances the author's interests rather than those of a project.
For a self-insured employer, the fact that I have a family makes me more expensive to employ. Hiring only young, single males or young, single, and sterile females allows them to raise base salary offers without inflating total compensation.
But they are not allowed by law to use the size of my family against me in the hiring process. Technically. Practically speaking, they do it anyway, and the law is unenforceable. If there's a potential legal problem, it's easy to fall back on the "not a good cultural fit" cushion.
If you don't expect someone to be contributing to their github repo on the clock, on your dime, don't check it as a criterion for employment.