Repository navigation
feat(cli): turn auto-approval on or off with project update - #414
Merged
Merged
Conversation
`argos project update --auto-approval false` turns off auto-approved branches, so every build needs a review, base branch included; `true` turns it back on. The glob is kept either way. `project get` and `project update` print "Auto-approved branches: none" while it is off. The API client's Project schema and updateProject body gain `autoApprovalEnabled`, added by hand like #386 since the field is not in the published OpenAPI spec until argos-ci/argos#2754 deploys. Until then the API ignores the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
--auto-approval true|falsetoargos project update, for the per-project toggle from argos-ci/argos#2754 (ARG-518).project update: the flag maps to the newautoApprovalEnabledbody field. The glob is kept either way.project getandproject updateprintAuto-approved branches: nonewhile auto-approval is off.autoApprovalEnabledis added to theProjectschema and theupdateProjectbody, along with the API's updated description ofautoApprovedBranchGlob. These lines are added by hand, as in fix(core): report pull request deployments on the head commit #386, because the published OpenAPI spec won't have the field until feat(project): allow turning off auto-approved branches argos#2754 deploys. The descriptions are copied from that PR's zod schemas.Release order
Release after argos-ci/argos#2754 is deployed. Before that, the API's zod body schema strips the unknown field, so the flag does nothing: the project comes back unchanged.
Verification
turbo run build check-types lint check-format testpasses for@argos-ci/cliand@argos-ci/api-client.format.test.tsnow covers both outputs.--auto-approval falseprintedAuto-approved branches: none, and the database hadautoApprovalEnabled = false;--auto-approved-branch-glob 'release/**'while off kept auto-approval off;--auto-approval trueprintedAuto-approved branches: release/**;--auto-approval maybewas rejected with the allowed choices.🤖 Generated with Claude Code