Fixed lint errors

This commit is contained in:
Tonye Jack 2023-05-22 22:00:25 -06:00
parent e6185dc5e7
commit fc9b15c757
4 changed files with 11 additions and 15 deletions

16
dist/index.js generated vendored
View File

@ -202,7 +202,7 @@ const getCurrentSHA = ({ inputs, workingDirectory }) => __awaiter(void 0, void 0
});
}
catch (error) {
core.error('Invalid until date: ' + inputs.until + '. ' + error.message);
core.error(`Invalid until date: ${inputs.until}. ${error.message}`);
throw error;
}
}
@ -217,11 +217,11 @@ const getCurrentSHA = ({ inputs, workingDirectory }) => __awaiter(void 0, void 0
});
const getSHAForPushEvent = (inputs, env, workingDirectory, isShallow, hasSubmodule, gitExtraArgs, isTag) => __awaiter(void 0, void 0, void 0, function* () {
let targetBranch = env.GITHUB_REFNAME;
let currentBranch = targetBranch;
const currentBranch = targetBranch;
let initialCommit = false;
let currentSha = inputs.sha;
let previousSha = inputs.baseSha;
let diff = '..';
const diff = '..';
if (isShallow) {
core.info('Repository is shallow, fetching more history...');
if (isTag) {
@ -297,10 +297,7 @@ const getSHAForPushEvent = (inputs, env, workingDirectory, isShallow, hasSubmodu
});
}
catch (error) {
core.error('Invalid since date: ' +
inputs.since +
'. ' +
error.message);
core.error(`Invalid since date: ${inputs.since}. ${error.message}`);
throw error;
}
}
@ -366,7 +363,7 @@ const getSHAForPushEvent = (inputs, env, workingDirectory, isShallow, hasSubmodu
exports.getSHAForPushEvent = getSHAForPushEvent;
const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, hasSubmodule, gitExtraArgs) => __awaiter(void 0, void 0, void 0, function* () {
let targetBranch = env.GITHUB_EVENT_PULL_REQUEST_BASE_REF;
let currentBranch = env.GITHUB_EVENT_PULL_REQUEST_HEAD_REF;
const currentBranch = env.GITHUB_EVENT_PULL_REQUEST_HEAD_REF;
let currentSha = inputs.sha;
let previousSha = inputs.baseSha;
let diff = '...';
@ -439,7 +436,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
}
currentSha = yield getCurrentSHA({ inputs, workingDirectory });
if (!env.GITHUB_EVENT_PULL_REQUEST_BASE_REF ||
env.GITHUB_EVENT_HEAD_REPO_FORK == 'true') {
env.GITHUB_EVENT_HEAD_REPO_FORK === 'true') {
diff = '..';
}
if (!previousSha) {
@ -1098,6 +1095,7 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setOutput = exports.getFilePatterns = exports.jsonOutput = exports.getDirnameMaxDepth = exports.canDiffCommits = exports.getPreviousGitTag = exports.verifyCommitSha = exports.getBranchHeadSha = exports.getParentHeadSha = exports.getHeadSha = exports.gitLog = exports.gitDiff = exports.gitRenamedFiles = exports.gitSubmoduleDiffSHA = exports.getSubmodulePath = exports.gitFetchSubmodules = exports.gitFetch = exports.submoduleExists = exports.isRepoShallow = exports.updateGitGlobalConfig = exports.getFilesFromSourceFile = exports.getPatterns = exports.exists = exports.escapeString = exports.verifyMinimumGitVersion = void 0;
/*global AsyncIterableIterator*/
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
const internal_match_kind_1 = __nccwpck_require__(1063);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,7 @@
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"lint:fix": "eslint --fix src/**/*.ts",
"package": "ncc build lib/main.js --source-map --license licenses.txt",
"test": "jest --coverage",
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"

View File

@ -42,7 +42,7 @@ const getCurrentSHA = async ({
})
} catch (error) {
core.error(
`Invalid until date: ${ inputs.until }. ${ (error as Error).message}`
`Invalid until date: ${inputs.until}. ${(error as Error).message}`
)
throw error
}
@ -163,10 +163,7 @@ export const getSHAForPushEvent = async (
})
} catch (error) {
core.error(
`Invalid since date: ${
inputs.since
}. ${
(error as Error).message}`
`Invalid since date: ${inputs.since}. ${(error as Error).message}`
)
throw error
}