refactor: replace .indexOf() with .includes() (#39195)

This commit is contained in:
Milan Burda 2023-07-24 12:32:54 +02:00 committed by GitHub
parent 9cd5de7588
commit 2c52eb7e1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -50,7 +50,7 @@ async function getDraftRelease (version, skipValidation) {
if (!skipValidation) {
failureCount = 0;
check(drafts.length === 1, 'one draft exists', true);
if (versionToCheck.indexOf('beta') > -1) {
if (versionToCheck.includes('beta')) {
check(draft.prerelease, 'draft is a prerelease');
}
check(draft.body.length > 50 && !draft.body.includes('(placeholder)'), 'draft has release notes');