if(total_count!==1||total_count!==actions_caches.length){// leave all find logic to the actual cache implementation. We just want to make sure we're returned a single element so we don't accidentally delete an entry that belongs to a different gitref.
if(total_count>1){
exports.logWarning(`More than one cache entry found for key ${key}`);
exports.logWarning(`${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}' trying to delete cache with key: ${key}`);
exports.logWarning(`Github API reported error: ${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}'`);
}
response=e;
core.info(`Couldn't delete cache entry for key ${key}.`);
return;
}
returnresponse;
});
}
exports.deleteCacheByKey=deleteCacheByKey;
functionlogWarning(message){
constwarningPrefix="[warning]";
core.info(`${warningPrefix}${message}`);
}
exports.logWarning=logWarning;
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
if(total_count!==1||total_count!==actions_caches.length){// leave all find logic to the actual cache implementation. We just want to make sure we're returned a single element so we don't accidentally delete an entry that belongs to a different gitref.
if(total_count>1){
exports.logWarning(`More than one cache entry found for key ${key}`);
exports.logWarning(`${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}' trying to delete cache with key: ${key}`);
exports.logWarning(`Github API reported error: ${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}'`);
}
response=e;
core.info(`Couldn't delete cache entry for key ${key}.`);
return;
}
returnresponse;
});
}
exports.deleteCacheByKey=deleteCacheByKey;
functionlogWarning(message){
constwarningPrefix="[warning]";
core.info(`${warningPrefix}${message}`);
}
exports.logWarning=logWarning;
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
if(total_count!==1||total_count!==actions_caches.length){// leave all find logic to the actual cache implementation. We just want to make sure we're returned a single element so we don't accidentally delete an entry that belongs to a different gitref.
if(total_count>1){
exports.logWarning(`More than one cache entry found for key ${key}`);
exports.logWarning(`${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}' trying to delete cache with key: ${key}`);
exports.logWarning(`Github API reported error: ${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}'`);
}
response=e;
core.info(`Couldn't delete cache entry for key ${key}.`);
return;
}
returnresponse;
});
}
exports.deleteCacheByKey=deleteCacheByKey;
functionlogWarning(message){
constwarningPrefix="[warning]";
core.info(`${warningPrefix}${message}`);
}
exports.logWarning=logWarning;
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
if(total_count!==1||total_count!==actions_caches.length){// leave all find logic to the actual cache implementation. We just want to make sure we're returned a single element so we don't accidentally delete an entry that belongs to a different gitref.
if(total_count>1){
exports.logWarning(`More than one cache entry found for key ${key}`);
exports.logWarning(`${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}' trying to delete cache with key: ${key}`);
exports.logWarning(`Github API reported error: ${err.name} '${err.status}: ${errData===null||errData===void0?void0:errData.message}'`);
}
response=e;
core.info(`Couldn't delete cache entry for key ${key}.`);
return;
}
returnresponse;
});
}
exports.deleteCacheByKey=deleteCacheByKey;
functionlogWarning(message){
constwarningPrefix="[warning]";
core.info(`${warningPrefix}${message}`);
}
exports.logWarning=logWarning;
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
// This is the behavior seen when search doesn't find anything, but it is seen both when no key matches, as well as when the key matches but the entry belongs to another (likely the base) branch.