Is there a pull request template that does this?
Methinks somebody missed the memo what open source means.
I’d really advise against forcing all code contributions to be copyrighted to you. It doesn’t send a great message to contributors. It also gets murky if any libraries are used.
If you want that, you’ll get fewer contributors, but just make that explicitly clear in your pull request template.
Personally, I would never contribute to a project where the maintainer demanded I transfer copyright ownership of my contributions. I also wouldn’t use a project that did that, and would advise other people to not use that project either.
Not saying I’m a fan but you I think you are looking for a CLA or contributor license agreement
What is the need for this?
Some GPL projects do it. If you find someone infringing, it’s easier to sue them if you have one copywrite holder instead of 100.
Generally the only groups I would maybe since such a CLA in regard to the GPL is: the FSF and the Linux Foundation. Anybody else (especially individuals I don’t know) I wouldn’t sign any CLA unless my contribution is like a 1 off, trivial patch.