diff --git a/changelog/validate/action.yml b/changelog/validate/action.yml index e57ade71..7899c430 100644 --- a/changelog/validate/action.yml +++ b/changelog/validate/action.yml @@ -88,23 +88,31 @@ runs: $PREFIX_FLAG - name: Gate + if: always() shell: bash env: STATUS: ${{ steps.evaluate.outputs.status }} + EVALUATE_OUTCOME: ${{ steps.evaluate.outcome }} run: | + # When docs-builder already exited non-zero for this status, the error + # diagnostic was already emitted natively. Run with if:always() so that + # ::notice:: is surfaced even when evaluate-pr fails for other reasons. case "$STATUS" in proceed|skipped|manually-edited) echo "::notice::Changelog validation: $STATUS" ;; no-label) + [[ "$EVALUATE_OUTCOME" == "failure" ]] && exit 0 echo "::error::No matching changelog type label found on this PR. Add a label from your changelog.yml pivot.types, or a skip label." exit 1 ;; no-title) + [[ "$EVALUATE_OUTCOME" == "failure" ]] && exit 0 echo "::error::PR has no title. Cannot generate a changelog entry." exit 1 ;; *) + [[ "$EVALUATE_OUTCOME" == "failure" ]] && exit 0 echo "::error::Changelog validation failed: $STATUS" exit 1 ;;