chore: fix minor script warnings (#25575)

This commit is contained in:
Charles Kerr 2020-09-23 15:21:34 -05:00 committed by GitHub
parent 353c63e47a
commit 515e85079f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 15 deletions

View file

@ -1,7 +1,6 @@
const args = require('minimist')(process.argv.slice(2));
const { Octokit } = require('@octokit/rest');
const octokit = new Octokit();
const path = require('path');
async function checkIfDocOnlyChange () {
if (args.prNumber || args.prBranch || args.prURL) {

View file

@ -182,7 +182,7 @@ const parseCommitMessage = (commitMessage, commit) => {
}
// https://help.github.com/articles/closing-issues-using-keywords/
if ((match = body.match(/\b(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|for)\s#(\d+)\b/i))) {
if (body.match(/\b(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|for)\s#(\d+)\b/i)) {
commit.semanticType = commit.semanticType || 'fix';
}

View file

@ -199,7 +199,7 @@ async function prepareRelease (isBeta, notesOnly) {
const releaseNotes = await getReleaseNotes(currentBranch, newVersion);
console.log(`Draft release notes are: \n${releaseNotes.text}`);
} else {
const changes = await changesToRelease(currentBranch);
const changes = await changesToRelease();
if (changes) {
await verifyNewVersion();
await createRelease(currentBranch, isBeta);