Help keeping or enforcing commit line length

When doing PR merges and similar using the Github web interface it’s very hard to keep line length to 50/72. There’s no indication when you’ve passed the limit and there seems to be no way to enforce it on a repo basis either.

Is there any functionality that I might have missed?

I would like if each repo had a setting for the line length(s), and and option to either enforce or warn if a commit does not comply with it.

At minimum I would like some indication in the text fields: maybe turn the text red if it’s longer than 72 characters. Even just having a monospaced font for these fields would help.