Add --auth-values option to ddl apistate set command#163
Conversation
Enable setting Authorization Default Value in API release state management for CDS views.
Add auth values to apistate
📝 WalkthroughWalkthroughThe PR adds support for an ChangesAuthorization Default Value Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@doc/commands/ddl.md`:
- Line 82: Update the user-facing option text for the --auth-values flag to use
consistent capitalization: change "authorization Default Value" to
"Authorization Default Value" wherever the --auth-values option description
appears (ensure the capital "A" is used to match terminology used elsewhere in
the document).
In `@test/unit/test_sap_cli_apirelease.py`:
- Line 344: The two multiline calls to _parse in the test (the one including the
args '--state', 'Released', '--cloud-dev', 'No', '--key-user-apps', 'Yes' and
the similar call around line 416) are over-indented and trigger Flake8 E127;
reformat each call so the continuation lines are indented either to align under
the first argument after the opening parenthesis or use a consistent hanging
indent (one level) inside the _parse( ... ) invocation, ensuring the arguments
line up vertically and no extra spaces cause an over-indentation error.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 348c8a99-4a02-4626-ac94-f79e8cd7ef12
📒 Files selected for processing (5)
doc/commands/ddl.mdsap/adt/apirelease.pysap/cli/apirelease.pytest/unit/test_sap_adt_apirelease.pytest/unit/test_sap_cli_apirelease.py
| - **--comment** - free-text comment | ||
| - **--cloud-dev** - use in Cloud Development: Yes or No | ||
| - **--key-user-apps** - use in Key User Apps: Yes or No | ||
| - **--auth-values** - authorization Default Value: Yes or No |
There was a problem hiding this comment.
Fix capitalization for consistency in user-facing option text.
Use Authorization Default Value (capital A) to match the terminology used elsewhere in this document.
✏️ Proposed doc fix
-- **--auth-values** - authorization Default Value: Yes or No
+- **--auth-values** - Authorization Default Value: Yes or No📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **--auth-values** - authorization Default Value: Yes or No | |
| - **--auth-values** - Authorization Default Value: Yes or No |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@doc/commands/ddl.md` at line 82, Update the user-facing option text for the
--auth-values flag to use consistent capitalization: change "authorization
Default Value" to "Authorization Default Value" wherever the --auth-values
option description appears (ensure the capital "A" is used to match terminology
used elsewhere in the document).
| console = BufferConsole() | ||
| args = _parse(group, 'apistate', 'set', 'c1', 'I_STATISTICALKEYFIGURECAT', | ||
| '--state', 'Released', '--cloud-dev', 'No', '--key-user-apps', 'Yes') | ||
| '--state', 'Released', '--cloud-dev', 'No', '--key-user-apps', 'Yes', |
There was a problem hiding this comment.
Fix Flake8 E127 continuation indentation in multiline _parse calls.
Both lines are currently over-indented and can fail lint checks.
Proposed formatting fix
- args = _parse(group, 'apistate', 'set', 'c1', 'I_STATISTICALKEYFIGURECAT',
- '--state', 'Released', '--cloud-dev', 'No', '--key-user-apps', 'Yes',
- '--auth-values', 'No')
+ args = _parse(
+ group, 'apistate', 'set', 'c1', 'I_STATISTICALKEYFIGURECAT',
+ '--state', 'Released', '--cloud-dev', 'No', '--key-user-apps', 'Yes',
+ '--auth-values', 'No',
+ )
- args = _parse(group, 'apistate', 'set', 'c0', 'I_STATISTICALKEYFIGURECAT',
- '--auth-values', 'Yes')
+ args = _parse(
+ group, 'apistate', 'set', 'c0', 'I_STATISTICALKEYFIGURECAT',
+ '--auth-values', 'Yes',
+ )Also applies to: 416-416
🧰 Tools
🪛 Flake8 (7.3.0)
[error] 344-344: continuation line over-indented for visual indent
(E127)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@test/unit/test_sap_cli_apirelease.py` at line 344, The two multiline calls to
_parse in the test (the one including the args '--state', 'Released',
'--cloud-dev', 'No', '--key-user-apps', 'Yes' and the similar call around line
416) are over-indented and trigger Flake8 E127; reformat each call so the
continuation lines are indented either to align under the first argument after
the opening parenthesis or use a consistent hanging indent (one level) inside
the _parse( ... ) invocation, ensuring the arguments line up vertically and no
extra spaces cause an over-indentation error.
Adds support for setting Authorization Default Value in API release state management for CDS views via the
--auth-valuesCLI option.