Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@redpanda-data/docs-extensions-and-macros",
"version": "4.13.3",
"version": "4.13.4",
"description": "Antora extensions and macros developed for Redpanda documentation.",
"keywords": [
"antora",
Expand Down
15 changes: 9 additions & 6 deletions tools/redpanda-connect/pr-summary-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,9 @@ function generatePRSummary(diffData, binaryAnalysis = null, draftedConnectors =
lines.push('');
cloudSupportedNew.forEach(c => {
lines.push(`- **${c.name}** (${c.type}, ${c.status})`);
if (c.description) {
const shortDesc = truncateToSentence(c.description, 2);
const desc = c.summary || c.description;
if (desc) {
const shortDesc = truncateToSentence(desc, 2);
lines.push(` - ${shortDesc}`);
}
});
Expand All @@ -410,8 +411,9 @@ function generatePRSummary(diffData, binaryAnalysis = null, draftedConnectors =
lines.push('');
selfHostedOnlyNew.forEach(c => {
lines.push(`- **${c.name}** (${c.type}, ${c.status})`);
if (c.description) {
const shortDesc = truncateToSentence(c.description, 2);
const desc = c.summary || c.description;
if (desc) {
const shortDesc = truncateToSentence(desc, 2);
lines.push(` - ${shortDesc}`);
}
});
Expand All @@ -421,8 +423,9 @@ function generatePRSummary(diffData, binaryAnalysis = null, draftedConnectors =
// No cloud support info, just list all
diffData.details.newComponents.forEach(c => {
lines.push(`- **${c.name}** (${c.type}, ${c.status})`);
if (c.description) {
const shortDesc = truncateToSentence(c.description, 2);
const desc = c.summary || c.description;
if (desc) {
const shortDesc = truncateToSentence(desc, 2);
lines.push(` - ${shortDesc}`);
}
});
Expand Down
16 changes: 11 additions & 5 deletions tools/redpanda-connect/rpcn-connector-docs-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ function updateWhatsNew ({ dataDir, oldVersion, newVersion, binaryAnalysis }) {
for (const comp of comps) {
section += `** xref:guides:bloblang/functions.adoc#${comp.name}[\`${comp.name}\`]`
if (comp.status && comp.status !== 'stable') section += ` (${comp.status})`
if (comp.description) {
section += `: ${capToTwoSentences(comp.description)}`
const desc = comp.summary || comp.description
if (desc) {
section += `: ${capToTwoSentences(desc)}`
} else {
section += `\n+\n// TODO: Add description for ${comp.name} function`
}
Expand All @@ -201,8 +202,9 @@ function updateWhatsNew ({ dataDir, oldVersion, newVersion, binaryAnalysis }) {
for (const comp of comps) {
section += `** xref:guides:bloblang/methods.adoc#${comp.name}[\`${comp.name}\`]`
if (comp.status && comp.status !== 'stable') section += ` (${comp.status})`
if (comp.description) {
section += `: ${capToTwoSentences(comp.description)}`
const desc = comp.summary || comp.description
if (desc) {
section += `: ${capToTwoSentences(desc)}`
} else {
section += `\n+\n// TODO: Add description for ${comp.name} method`
}
Expand Down Expand Up @@ -267,7 +269,8 @@ function updateWhatsNew ({ dataDir, oldVersion, newVersion, binaryAnalysis }) {

for (const comp of diff.details.deprecatedComponents) {
const typeLabel = comp.type.charAt(0).toUpperCase() + comp.type.slice(1)
const desc = comp.description ? capToTwoSentences(comp.description) : '-'
const descText = comp.summary || comp.description
const desc = descText ? capToTwoSentences(descText) : '-'

if (comp.type === 'bloblang-functions') {
section += `|xref:guides:bloblang/functions.adoc#${comp.name}[${comp.name}]\n`
Expand Down Expand Up @@ -913,6 +916,9 @@ async function handleRpcnConnectorDocs (options) {
fs.unlinkSync(oldestPath)
console.log(`🧹 Deleted old version from docs-data: ${oldestFile}`)
}

// Reload newIndex after augmentation so diff generation uses augmented data
newIndex = JSON.parse(fs.readFileSync(dataFile, 'utf8'))
} catch (err) {
console.error(`Warning: Failed to augment data file: ${err.message}`)
}
Expand Down