Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 66 additions & 38 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36129,18 +36129,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Filter = exports.isPredicateQuantifier = exports.SUPPORTED_PREDICATE_QUANTIFIERS = exports.PredicateQuantifier = void 0;
exports.Filter = exports.SUPPORTED_PREDICATE_QUANTIFIERS = exports.PredicateQuantifier = void 0;
exports.isPredicateQuantifier = isPredicateQuantifier;
const jsyaml = __importStar(__nccwpck_require__(1917));
const picomatch_1 = __importDefault(__nccwpck_require__(8569));
// Minimatch options used in all matchers
Expand Down Expand Up @@ -36182,7 +36193,6 @@ exports.SUPPORTED_PREDICATE_QUANTIFIERS = Object.values(PredicateQuantifier);
function isPredicateQuantifier(x) {
return exports.SUPPORTED_PREDICATE_QUANTIFIERS.includes(x);
}
exports.isPredicateQuantifier = isPredicateQuantifier;
class Filter {
filterConfig;
rules = {};
Expand Down Expand Up @@ -36283,15 +36293,34 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isGitSha = exports.getShortName = exports.getCurrentRef = exports.listAllFilesAsAdded = exports.parseGitDiffOutput = exports.getChangesSinceMergeBase = exports.getChangesOnHead = exports.getChanges = exports.getChangesInLastCommit = exports.HEAD = exports.NULL_SHA = void 0;
exports.HEAD = exports.NULL_SHA = void 0;
exports.getChangesInLastCommit = getChangesInLastCommit;
exports.getChanges = getChanges;
exports.getChangesOnHead = getChangesOnHead;
exports.getChangesSinceMergeBase = getChangesSinceMergeBase;
exports.parseGitDiffOutput = parseGitDiffOutput;
exports.listAllFilesAsAdded = listAllFilesAsAdded;
exports.getCurrentRef = getCurrentRef;
exports.getShortName = getShortName;
exports.isGitSha = isGitSha;
const exec_1 = __nccwpck_require__(1514);
const core = __importStar(__nccwpck_require__(2186));
const file_1 = __nccwpck_require__(1641);
Expand All @@ -36309,7 +36338,6 @@ async function getChangesInLastCommit() {
}
return parseGitDiffOutput(output);
}
exports.getChangesInLastCommit = getChangesInLastCommit;
async function getChanges(base, head) {
const baseRef = await ensureRefAvailable(base);
const headRef = await ensureRefAvailable(head);
Expand All @@ -36327,7 +36355,6 @@ async function getChanges(base, head) {
}
return parseGitDiffOutput(output);
}
exports.getChanges = getChanges;
async function getChangesOnHead() {
// Get current changes - both staged and unstaged
core.startGroup(`Change detection on HEAD`);
Expand All @@ -36341,7 +36368,6 @@ async function getChangesOnHead() {
}
return parseGitDiffOutput(output);
}
exports.getChangesOnHead = getChangesOnHead;
async function getChangesSinceMergeBase(base, head, initialFetchDepth) {
let baseRef;
let headRef;
Expand Down Expand Up @@ -36415,7 +36441,6 @@ async function getChangesSinceMergeBase(base, head, initialFetchDepth) {
}
return parseGitDiffOutput(output);
}
exports.getChangesSinceMergeBase = getChangesSinceMergeBase;
function parseGitDiffOutput(output) {
const tokens = output.split('\u0000').filter(s => s.length > 0);
const files = [];
Expand All @@ -36427,7 +36452,6 @@ function parseGitDiffOutput(output) {
}
return files;
}
exports.parseGitDiffOutput = parseGitDiffOutput;
async function listAllFilesAsAdded() {
core.startGroup('Listing all files tracked by git');
let output = '';
Expand All @@ -36446,7 +36470,6 @@ async function listAllFilesAsAdded() {
filename: path
}));
}
exports.listAllFilesAsAdded = listAllFilesAsAdded;
async function getCurrentRef() {
core.startGroup(`Get current git ref`);
try {
Expand All @@ -36464,7 +36487,6 @@ async function getCurrentRef() {
core.endGroup();
}
}
exports.getCurrentRef = getCurrentRef;
function getShortName(ref) {
if (!ref)
return '';
Expand All @@ -36476,11 +36498,9 @@ function getShortName(ref) {
return ref.slice(tags.length);
return ref;
}
exports.getShortName = getShortName;
function isGitSha(ref) {
return /^[a-z0-9]{40}$/.test(ref);
}
exports.isGitSha = isGitSha;
async function hasCommit(ref) {
return (await (0, exec_1.getExecOutput)('git', ['cat-file', '-e', `${ref}^{commit}`], { ignoreReturnCode: true })).exitCode === 0;
}
Expand Down Expand Up @@ -36568,13 +36588,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs = __importStar(__nccwpck_require__(7147));
const core = __importStar(__nccwpck_require__(2186));
Expand Down Expand Up @@ -36848,7 +36878,7 @@ run();
"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.csvEscape = void 0;
exports.csvEscape = csvEscape;
// Returns filename escaped for CSV
// Wraps file name into "..." only when it contains some potentially unsafe character
function csvEscape(value) {
Expand All @@ -36864,7 +36894,6 @@ function csvEscape(value) {
// another double quote
return `"${value.replace(/"/g, '""')}"`;
}
exports.csvEscape = csvEscape;


/***/ }),
Expand All @@ -36875,12 +36904,12 @@ exports.csvEscape = csvEscape;
"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.shellEscape = exports.backslashEscape = void 0;
exports.backslashEscape = backslashEscape;
exports.shellEscape = shellEscape;
// Backslash escape every character except small subset of definitely safe characters
function backslashEscape(value) {
return value.replace(/([^a-zA-Z0-9,._+:@%/-])/gm, '\\$1');
}
exports.backslashEscape = backslashEscape;
// Returns filename escaped for usage as shell argument.
// Applies "human readable" approach with as few escaping applied as possible
function shellEscape(value) {
Expand All @@ -36901,7 +36930,6 @@ function shellEscape(value) {
// Contains some unsafe characters but no single quote
return `'${value}'`;
}
exports.shellEscape = shellEscape;


/***/ }),
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading
Loading