diff --git a/changelog/submit/action.yml b/changelog/submit/action.yml index 6a8201e..e749e96 100644 --- a/changelog/submit/action.yml +++ b/changelog/submit/action.yml @@ -153,6 +153,7 @@ runs: CHANGELOG_TYPE: ${{ steps.evaluate.outputs.type }} CHANGELOG_OWNER: ${{ github.repository_owner }} CHANGELOG_REPO: ${{ github.event.repository.name }} + CHANGELOG_PRODUCTS: ${{ steps.evaluate.outputs.products }} run: | mkdir -p /tmp/changelog-staging docs-builder changelog add \ @@ -247,6 +248,7 @@ runs: env: PR_NUMBER: ${{ steps.pr.outputs.number }} LABEL_TABLE: ${{ steps.evaluate.outputs.label-table }} + PRODUCT_LABEL_TABLE: ${{ steps.evaluate.outputs.product-label-table }} CONFIG_FILE: ${{ inputs.config }} with: github-token: ${{ inputs.github-token }} diff --git a/changelog/submit/scripts/post-failure-comment.js b/changelog/submit/scripts/post-failure-comment.js index a05097a..7ac362b 100644 --- a/changelog/submit/scripts/post-failure-comment.js +++ b/changelog/submit/scripts/post-failure-comment.js @@ -4,12 +4,13 @@ module.exports = async ({ github, context, core }) => { const prNumber = parseInt(process.env.PR_NUMBER, 10); const configFile = process.env.CONFIG_FILE || 'docs/changelog.yml'; const labelRows = process.env.LABEL_TABLE || ''; + const productLabelRows = process.env.PRODUCT_LABEL_TABLE || ''; let labelSection; if (labelRows.trim()) { labelSection = [ '', - '🔖 Add one of these labels to your PR:', + '🔖 Add one of these **type** labels to your PR:', '', labelRows, ].join('\n'); @@ -17,11 +18,22 @@ module.exports = async ({ github, context, core }) => { labelSection = `\nAdd a type label that matches your \`pivot.types\` configuration in \`${configFile}\`.`; } + let productSection = ''; + if (productLabelRows.trim()) { + productSection = [ + '', + '📦 Add one or more **product** labels:', + '', + productLabelRows, + ].join('\n'); + } + const body = [ TITLE, '', '⚠️ **Cannot generate changelog:** no matching type label found on this PR.', labelSection, + productSection, '', `🔖 To skip changelog generation or configure label rules, see \`${configFile}\`.`, ].join('\n');