Add bool check for exiting the script with error code if no PRs are found#3007
Add bool check for exiting the script with error code if no PRs are found#3007markovskipetar wants to merge 1 commit intomasterfrom
Conversation
ArcticDB Code Review Summary - PR 3007This PR adds an exit_with_error_if_no_prs boolean input to the calculate_next_version reusable workflow. When false, the workflow falls back to a default patch increment instead of failing when no PRs are found between branches. Compatibility: No breaking changes. New input has required=false and default=true, preserving existing behaviour for all current callers. Workflow-only change with no on-disk format or Python API impact. Correctness: The fallback path correctly sets both increment_type=patch and tag outputs before exit 0, so the downstream get-next-version step receives valid inputs. The shell comparison EXIT_WITH_ERROR equals true is correct for GitHub Actions boolean inputs surfaced via env vars. Code Quality - NEEDS FIX: Two trailing-whitespace lines introduced at line 23 (after the description field) and line 67 (blank line inside the run block). Inline comments with one-click fix suggestions have been posted. Testing: Internal CI workflow change with no unit or integration tests expected. Suggestion: consider a caller that exercises exit_with_error_if_no_prs=false to verify the fallback end-to-end. Security: No hardcoded credentials. Pre-existing pattern where tag values are interpolated directly into the shell script via GitHub Actions expressions is unchanged. PR Title and Description - NEEDS FIX: (1) PR description typo scrip should be script. (2) PR title has a trailing space. Documentation: New input has an inline description field in the workflow YAML which is sufficient for a reusable workflow parameter. |
Add the bool check
exit_with_error_if_no_prsin theautomated_release.calculate_next_version.yml. If the value istrue, the script will exit with exit code 1 if no PRs are found, otherwise it will fallback to the defaultincrement_type=patchfor next version