Is this legal to do such modification?
Answer no.
New question: Can you do anything against this?
On court: Yes, if you have registered it or at least send a postal copy to yourself.
Actually it could be that the person intends to register copyright on his/her own and even sue you for copyright infringement... could.
On GitHub directly:
Yes: File a DMCA takedown notice (see below).
What should I do as a owner of the repository?
Beforehand: make sure to have a good position to claim your copyright later (as written before).
After this issue happened: Contact the changing person politely and ask for his/her intentions. If I'm not wrong GitHub repos have automatically an Issue tracker which you should use, providing links to your repo.
It could be that the person doesn't know you have an online repo (e.g. was given the source somewhere) and it could be that the person want to do changes that you want to include. Therefore it would be good to think about how you want to accept contributions and make this clear within your README.md or similar.
In any case I'd suggest to kindly ask to recreate the repository with a fork (showing the ancestry and making it more easy to share changes).
After you did this or if there is no response within some days (I won't wait longer than 2 weeks) you can file a File a DMCA takedown notice at GitHub.