mirror of
https://github.com/0belous/universal-plugin-repo.git
synced 2025-12-20 03:31:18 -03:00
Fix: change description not overview
This commit is contained in:
parent
fea3828937
commit
0ded79a257
1 changed files with 5 additions and 4 deletions
|
|
@ -98,13 +98,14 @@ async function processDescriptions(pluginData) {
|
||||||
const repoUrl = findGithubUrl(plugin);
|
const repoUrl = findGithubUrl(plugin);
|
||||||
if (repoUrl) {
|
if (repoUrl) {
|
||||||
const sourceLink = `\n\n[Source Code](${repoUrl})`;
|
const sourceLink = `\n\n[Source Code](${repoUrl})`;
|
||||||
const descriptionProp = plugin.overview ? 'overview' : (plugin.Description ? 'Description' : null);
|
const descriptionProp = ['description', 'Description', 'overview'].find(p => plugin[p]);
|
||||||
|
|
||||||
if (descriptionProp) {
|
if (descriptionProp) {
|
||||||
if (!plugin[descriptionProp].includes(repoUrl)) {
|
if (!plugin[descriptionProp].includes(repoUrl)) {
|
||||||
plugin[descriptionProp] += sourceLink;
|
plugin[descriptionProp] += sourceLink;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.overview = sourceLink.trim();
|
plugin.description = sourceLink.trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -150,8 +151,8 @@ async function writeManifest(dataToWrite){
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const plugins = await getSources();
|
const plugins = await getSources();
|
||||||
await processImages(plugins);
|
|
||||||
await processDescriptions(plugins);
|
await processDescriptions(plugins);
|
||||||
|
await processImages(plugins);
|
||||||
await writeManifest(plugins);
|
await writeManifest(plugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue