Conversation
WalkthroughNeedConfirm() now returns the confirm flag value directly and WithConfirmFlag() sets that flag's default to true; checks in approval functions were adjusted to use the new NeedConfirm() behavior, altering when interactive confirmation is skipped versus prompted. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pkg/approval.go`:
- Around line 31-34: CheckOrganizationApprobation has inverted confirm-flag
logic compared to CheckStackApprobation: when the flag is true it currently
skips the prompt. Update CheckOrganizationApprobation to match
CheckStackApprobation by negating the check (e.g., use if !GetBool(cmd,
confirmFlag) { /* show prompt */ } or reuse NeedConfirm/GetBool consistently) so
that --confirm=true shows the interactive prompt and --confirm=false skips it;
locate and change the conditional in the CheckOrganizationApprobation function
accordingly.
Signed-off-by: Sylvain Rabot <sylvain@formance.com>
c5652a5 to
b12c06b
Compare
No description provided.