Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.info(options.fundingContentRaw);
console.info(`-------------`);
}
}
for (const repository of options.repositoryList) {
const adaptorOptions = {
owner: repository.owner,
repo: repository.repo,
ref: repository.ref || "heads/master",
token: repository.token
};
const repoMark = `${repository.owner}/${repository.repo}`;
const adaptor = options.createAdaptor
? options.createAdaptor(adaptorOptions)
: createGitHubAdaptor(adaptorOptions);
const korefile = createKoreFile({
adaptor: adaptor
});
try {
if (options.mode === "add") {
const user = options.user;
const fundingContent = await fetchFundingFile(korefile).catch((error) => {
// No Contents
if (error.status === 404) {
return {};
}
// other error
return Promise.reject(error);
});
const shouldUpdate = !hasUserInFunding(fundingContent, user);
if (!options.silent) {
console.info(`${repoMark}: ${shouldUpdate ? "Try to Update" : "No Update"}`);