Skip to content
Merged
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
8 changes: 8 additions & 0 deletions changelog/validate/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
Loading