From b1a5d230d6306c9ac4dc2b04695a75ec8255e4f0 Mon Sep 17 00:00:00 2001 From: subhu339 Date: Thu, 30 Jul 2026 21:35:17 +0530 Subject: [PATCH] feat: add check command to detect unreleased changes --- README.md | 1 + scripts/rz.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35194ba..a088e43 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Managing manual release notes is hard. Therefore, everyone tends to generate rel - Create your own release note template in `.releasezri/template.md` (Supports [template variables](https://codezri.org/docs/releasezri/integrate#supported-template-variables)) - Copy-paste the `scripts/rz.py` script - Update your DevOps workflow to generate release notes via `scripts/rz.py create ` command +- Optionally, use `scripts/rz.py check` in your workflow to detect if there are any unreleased changes before triggering a release (prints `ST_HAS_CHANGES` or `ST_NO_CHANGES`) This project itself is maintained with ReleaseZri. Read documentation here: https://codezri.org/docs/releasezri/intro diff --git a/scripts/rz.py b/scripts/rz.py index 4fe5c50..589d98e 100755 --- a/scripts/rz.py +++ b/scripts/rz.py @@ -123,5 +123,11 @@ def print_art(): elif command == 'cleanup': cleanup() + elif command == 'check': + if parse_release_note().strip() == '': + print('ST_NO_CHANGES') + else: + print('ST_HAS_CHANGES') + else: - print('ERROR: Invalid command!') + print('ERROR: Invalid command!') \ No newline at end of file