Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `limit-commit-title-length` feature #2115

Merged
merged 17 commits into from Jun 23, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Guard existence of input field on PR page

  • Loading branch information...
notlmn committed Jun 23, 2019
commit 9580a2dd91f631cdca209d75b6f82c4c038c9aa6
@@ -9,6 +9,11 @@ function init(): void {
'#merge_title_field' // PR merge message field
].join(','));

// The input field doesn't exist on PR merge page if you don't have access to that repo
if (!inputField) {
return;
}

inputField.addEventListener('input', () => {
inputField.setCustomValidity(inputField.value.length > 72 ? `The title should be maximum 72 characters, but is ${inputField.value.length}` : '');
});
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.