mirror of
https://github.com/dorny/paths-filter.git
synced 2026-07-02 05:39:31 +00:00
Merge 4c5aaae1a5 into f3ceefdc7e
This commit is contained in:
commit
7efdf018c8
3 changed files with 16 additions and 0 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
|
@ -761,11 +761,14 @@ async function getChangedFilesFromApi(token, pullRequest) {
|
|||
function exportResults(results, format) {
|
||||
core.info('Results:');
|
||||
const changes = [];
|
||||
let anyChanged = false;
|
||||
let allChanged = true;
|
||||
for (const [key, files] of Object.entries(results)) {
|
||||
const value = files.length > 0;
|
||||
core.startGroup(`Filter ${key} = ${value}`);
|
||||
if (files.length > 0) {
|
||||
changes.push(key);
|
||||
anyChanged = true;
|
||||
core.info('Matching files:');
|
||||
for (const file of files) {
|
||||
core.info(`${file.filename} [${file.status}]`);
|
||||
|
|
@ -773,6 +776,7 @@ function exportResults(results, format) {
|
|||
}
|
||||
else {
|
||||
core.info('Matching files: none');
|
||||
allChanged = false;
|
||||
}
|
||||
core.setOutput(key, value);
|
||||
core.setOutput(`${key}_count`, files.length);
|
||||
|
|
@ -780,6 +784,8 @@ function exportResults(results, format) {
|
|||
const filesValue = serializeExport(files, format);
|
||||
core.setOutput(`${key}_files`, filesValue);
|
||||
}
|
||||
core.setOutput('all_changed', allChanged);
|
||||
core.setOutput('any_changed', anyChanged);
|
||||
core.endGroup();
|
||||
}
|
||||
if (results['changes'] === undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue