A better solution would be to customize discourse with a plugin.
If you’re having trouble getting a development environment set up (then you really, really, really shouldn’t consider forking), you should try discourse/bin/docker at main · discourse/discourse · GitHub as recommended (Superseded) Set up a development environment using Vagrant on Ubuntu - #19 by sam.