Skip to content

Refuse whitespace as a promote approver - #137

Merged
jmjava merged 1 commit into
mainfrom
fix/refuse-whitespace-approved-by
Nov 1, 2026
Merged

jmjava merged 1 commit into
mainfrom
fix/refuse-whitespace-approved-by

Conversation

@jmjava

@jmjava jmjava commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • The operator released a promote when spec.approvedBy was only whitespace. The approval wait compared the field to an empty string.
  • waitingForApproval now trims the name, so a blank approver stays in PendingApproval and no PipelineRun is created.
  • One unit test covers a promote whose approver is spaces, a newline, and a tab.

Test plan

  • go test ./internal/controller/ -count=1 -run TestWaitingForApproval
  • CI checks on this PR are green

Made with Cursor

waitingForApproval treated any non-empty approvedBy as approval, so a blank name released the PipelineRun. Trim the field and keep the promote waiting.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jmjava
jmjava merged commit 57b252b into main Nov 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant