Update Jan. 2022: this is supported!
Right-to-left languages are now supported natively in text editors for Markdown files, comments, and gists.
Do you think they could be even better? Let us know how we can improve by contributing to our discussion.
Editor support for right to left languages:

July 2021: This is a problem not just for regular source code, but issues and discussions as well.
This is requested since 2016 in this thread:
Not all disscussions on github are in English and some like Persian, Hebrew or Arabic are written from right to left.
It would be easy to add a checkmark to the editor to switch the direction from LTR to RTL and then represent that piece of text in UI from right to left.
This would dramatically improve the usability and enhance UX.
This is watched by GitHub in github/feedback
discussion 2894, but not yet supported.
Nov. 2021: this is available for markdown documents:
Right-to-left languages are now supported natively in
- Markdown files,
- issues,
- pull requests,
- discussions, and
- comments.

So... not any file, but that is a progress.