An off-wiki code repository such as GitHub can be a big efficiency for software engineers. But it also comes with increased overhead. Here are the pros and cons as I see them.
Recommendation
For small gadgets with no activity, stay on wiki. Not worth the overhead of moving off-wiki
For big gadgets with multiple developers, needing automated tests, automated linting, etc, use GitHub for both issue tracking and pull requests.
The advantage of keeping the issue tracker and pull requests under the same roof is significant. Cross-linking, auto-closing tickets, etc.
Moving off-wiki
Pros
split a big gadget file into individual files (to be recompiled later)
linter
test suite
continuous integration
issue tracker
pull requests
Code review is easier. There is a system to leave comments regarding specific lines, mark them as resolved, etc.
Edit conflicts / rebase issues are handled more easily on an offsite repo. If using a wiki talk page to handle pull requests, and multiple people submit edit requests at once, it can be tricky to make sure changes don't get overwritten.
Git Blame - see who last touched a line of code
clearer who authored each patch, from a copyright and attribution perspective
Cons
Spinning up a test environment may require a custom script.
Danger of the off site repo getting out of sync with the onwiki code.
Less visibility. Can't put the repo on a wiki watchlist. Pull requests more likely to sit without getting reviews.
Non-developers rarely use issue trackers. They make all their posts to the talk page. So a developer has to transcribe them to the issue tracker, creating double work.
WMF devs, intadmins, and global intadmins that do mass refactoring of user scripts and gadgets will no longer be able to do this, since all code changes need to go through the offsite repo.