The process of adding CODE_OF_CONDUCT.md was very opinionated in terms of how it was added to the Wikimedia repositories, as well as many other details like whether markdown should be used, which repositories should have the file, filename itself, etc.
See T165540: Add CODE_OF_CONDUCT.md to Wikimedia repositories for much more.
The content of markdown files added to the Wikimedia repositories is following:
The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
The link to the mediawiki.org page should be https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct, so that a page is shown in user's preferred language.
Due to the sheer amount of repositories that have CoC file now, we need to agree how this should be changed/pushed/reviewed, not to end up in the same situation like in T165540.
The question of mediawiki.org links in user's preferred language is deeper than CoC files and some efforts are made for API links in T104518, but that is the topic for another ticket.