Yes, discriminating based on national origin is usually illegal. "No Irish" etc. It's up to the government to decide whether someone has the legal right to work, not individual employers.
Yeah, but discrimination based on location is different. I've seen remote companies say they'll only hire employees within 3 time zones of GMT, for example.
So if GitLab employs Russian nationals (living outside of Russia) but bans employees of any nationality living in Russia, I'm not sure this is discrimination based on national origin.
I'm a US remote contractor and the legal departments of many US companies won't even employee me full-time if I reveal that I don't spend 270 days inside the US (aka don't have US residence). Pretty standard practice to care about place of residence.
The guesses made by HNers in this thread about what's illegal must be way off.
The discussion is not about national origin, but place of residence. They explicitly mention that existing employees moving to those countries would also be blocked.
While I think that's true for foreign nationals who have a legal right to work in the US, I haven't seen anything to suggest it applies if they are residing in their home country.
As you probably know, Gitlab is 100% remote employees. Surely, if I had a remote development position posted I would be under no obligation to consider a candidate in China who sent me their resume (that intends to work from China).
So if GitLab employs Russian nationals (living outside of Russia) but bans employees of any nationality living in Russia, I'm not sure this is discrimination based on national origin.