This commit is contained in:
Alexander Kachkaev
2023-01-16 17:40:12 +00:00
parent 866eff55a5
commit 305cfeb74c

12
dist/index.js vendored
View File

@@ -47,10 +47,10 @@ const minimatch_1 = __nccwpck_require__(3973);
function run() { function run() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
const token = core.getInput("repo-token", { required: true }); const token = core.getInput('repo-token', { required: true });
const configPath = core.getInput("configuration-path", { required: true }); const configPath = core.getInput('configuration-path', { required: true });
const syncLabels = !!core.getInput("sync-labels", { required: false }); const syncLabels = !!core.getInput('sync-labels', { required: false });
const dot = !!core.getInput("dot", { required: false }); const dot = !!core.getInput('dot', { required: false });
const prNumber = getPrNumber(); const prNumber = getPrNumber();
if (!prNumber) { if (!prNumber) {
console.log('Could not get pull request number from context, exiting'); console.log('Could not get pull request number from context, exiting');
@@ -184,7 +184,7 @@ function isMatch(changedFile, matchers) {
} }
// equivalent to "Array.some()" but expanded for debugging and clarity // equivalent to "Array.some()" but expanded for debugging and clarity
function checkAny(changedFiles, globs, dot) { function checkAny(changedFiles, globs, dot) {
const matchers = globs.map((g) => new minimatch_1.Minimatch(g, { dot })); const matchers = globs.map(g => new minimatch_1.Minimatch(g, { dot }));
core.debug(` checking "any" patterns`); core.debug(` checking "any" patterns`);
for (const changedFile of changedFiles) { for (const changedFile of changedFiles) {
if (isMatch(changedFile, matchers)) { if (isMatch(changedFile, matchers)) {
@@ -197,7 +197,7 @@ function checkAny(changedFiles, globs, dot) {
} }
// equivalent to "Array.every()" but expanded for debugging and clarity // equivalent to "Array.every()" but expanded for debugging and clarity
function checkAll(changedFiles, globs, dot) { function checkAll(changedFiles, globs, dot) {
const matchers = globs.map((g) => new minimatch_1.Minimatch(g)); const matchers = globs.map(g => new minimatch_1.Minimatch(g));
core.debug(` checking "all" patterns`); core.debug(` checking "all" patterns`);
for (const changedFile of changedFiles) { for (const changedFile of changedFiles) {
if (!isMatch(changedFile, matchers)) { if (!isMatch(changedFile, matchers)) {