This is not a white hat hacker does. A white hat would have contacted Github in private with a PoC done with a dummy account and a test repo. There is a reason responsible disclosure guidelines exist.
Nothing to see here, move along.
I reject the dichotomy that this pushes people to sell their exploits on some illegal market. I think if people wanted to do that, they would irrespective of what Github did.
It took many years for the security industry to arrive at responsible disclosure guidelines; there is a reason they exist.