(edit: not saying that was the case here, working on devrel usually makes it part of your job to publish code)
I would never fire an employee unilaterally, especially over something like this, when there's valuable IP at stake and you can just talk the person into agreeing to sign over whatever it is you need.