From 380745f501a5712766c85602bb166448d900c7e8 Mon Sep 17 00:00:00 2001 From: Felipe Cotti Date: Fri, 27 Mar 2026 13:49:31 -0300 Subject: [PATCH] Fix changelog title inference --- changelog/submit/action.yml | 2 ++ changelog/submit/scripts/fetch-pr-data.js | 1 + changelog/validate/action.yml | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/changelog/submit/action.yml b/changelog/submit/action.yml index e749e96..fff2460 100644 --- a/changelog/submit/action.yml +++ b/changelog/submit/action.yml @@ -120,6 +120,7 @@ runs: REPO_NAME: ${{ github.event.repository.name }} PR_NUMBER: ${{ steps.pr.outputs.number }} PR_TITLE: ${{ steps.pr-data.outputs.title }} + PR_BODY: ${{ steps.pr-data.outputs.body }} PR_LABELS: ${{ steps.pr-data.outputs.labels }} HEAD_REF: ${{ steps.pr-data.outputs.head-ref }} HEAD_SHA: ${{ steps.pr-data.outputs.head-sha }} @@ -150,6 +151,7 @@ runs: CONFIG_FILE: ${{ steps.config.outputs.config-path || inputs.config }} CHANGELOG_PR_NUMBER: ${{ steps.pr.outputs.number }} CHANGELOG_TITLE: ${{ steps.evaluate.outputs.title }} + CHANGELOG_DESCRIPTION: ${{ steps.evaluate.outputs.description }} CHANGELOG_TYPE: ${{ steps.evaluate.outputs.type }} CHANGELOG_OWNER: ${{ github.repository_owner }} CHANGELOG_REPO: ${{ github.event.repository.name }} diff --git a/changelog/submit/scripts/fetch-pr-data.js b/changelog/submit/scripts/fetch-pr-data.js index 12a118a..adddb7b 100644 --- a/changelog/submit/scripts/fetch-pr-data.js +++ b/changelog/submit/scripts/fetch-pr-data.js @@ -9,6 +9,7 @@ module.exports = async ({ github, context, core }) => { return; } core.setOutput('title', pr.title); + core.setOutput('body', pr.body || ''); core.setOutput('labels', pr.labels.map(l => l.name).join(',')); core.setOutput('is-fork', String(pr.head.repo?.full_name !== pr.base.repo?.full_name)); core.setOutput('base-ref', pr.base.ref); diff --git a/changelog/validate/action.yml b/changelog/validate/action.yml index f3077a8..647ffea 100644 --- a/changelog/validate/action.yml +++ b/changelog/validate/action.yml @@ -42,11 +42,13 @@ runs: REPO_NAME: ${{ github.event.repository.name }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_TITLE: ${{ github.event.pull_request.title }} + PR_BODY: ${{ github.event.pull_request.body }} PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }} HEAD_REF: ${{ github.event.pull_request.head.ref }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} EVENT_ACTION: ${{ github.event.action }} TITLE_CHANGED: ${{ github.event.changes.title != null }} + BODY_CHANGED: ${{ github.event.changes.body != null }} STRIP_PREFIX: ${{ inputs.strip-title-prefix }} run: | TITLE_FLAG="" @@ -54,6 +56,11 @@ runs: TITLE_FLAG="--title-changed" fi + BODY_FLAG="" + if [ "$BODY_CHANGED" = "true" ]; then + BODY_FLAG="--body-changed" + fi + PREFIX_FLAG="" if [ "$STRIP_PREFIX" = "true" ]; then PREFIX_FLAG="--strip-title-prefix" @@ -70,6 +77,7 @@ runs: --head-sha "$HEAD_SHA" \ --event-action "$EVENT_ACTION" \ $TITLE_FLAG \ + $BODY_FLAG \ $PREFIX_FLAG - name: Gate