|
|
|
@ -144,6 +144,8 @@ jobs:
|
|
|
|
|
return `Act as ${title}`;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// First try to find prompts in README
|
|
|
|
|
let foundInReadme = false;
|
|
|
|
|
for (const file of files) {
|
|
|
|
|
console.log(`Processing file: ${file.filename}`);
|
|
|
|
|
if (file.filename === 'README.md') {
|
|
|
|
@ -166,8 +168,16 @@ jobs:
|
|
|
|
|
|
|
|
|
|
prompts.set(actName.toLowerCase(), { actName, promptText, contributorInfo });
|
|
|
|
|
console.log(`Found prompt in README: "${actName}"`);
|
|
|
|
|
foundInReadme = true;
|
|
|
|
|
}
|
|
|
|
|
} else if (file.filename === 'prompts.csv') {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Only look in CSV if we didn't find anything in README
|
|
|
|
|
if (!foundInReadme) {
|
|
|
|
|
console.log('No prompts found in README, checking CSV...');
|
|
|
|
|
for (const file of files) {
|
|
|
|
|
if (file.filename === 'prompts.csv') {
|
|
|
|
|
const patch = file.patch || '';
|
|
|
|
|
const addedLines = patch.split('\n')
|
|
|
|
|
.filter(line => line.startsWith('+'))
|
|
|
|
@ -182,8 +192,6 @@ jobs:
|
|
|
|
|
const actName = normalizeTitle(matches[0][1].replace(/""/g, '"').trim());
|
|
|
|
|
const promptText = matches[1][1].replace(/""/g, '"').trim();
|
|
|
|
|
|
|
|
|
|
// Only add if not already found in README
|
|
|
|
|
if (!prompts.has(actName.toLowerCase())) {
|
|
|
|
|
const contributorInfo = `Contributed by: [@${pr.user.login}](https://github.com/${pr.user.login})`;
|
|
|
|
|
prompts.set(actName.toLowerCase(), { actName, promptText, contributorInfo });
|
|
|
|
|
console.log(`Found prompt in CSV: "${actName}"`);
|
|
|
|
|