code-review
por contentstack
Use when reviewing PRs for the Python CDA SDK — public API, Stack, HTTP layer, tests, secrets.
npx skills add https://github.com/contentstack/contentstack-python --skill code-reviewCode review – Contentstack Python CDA SDK
When to use
- Reviewing a PR, self-review before submit, or running an automated review pass.
Instructions
Checklist
- API: New or changed
Stack/ content-type / query / entry methods documented;contentstack/__init__.pyexports updated if needed. - Version:
__version__incontentstack/__init__.pyaligned with release strategy for breaking changes. - HTTP:
https_connection.py/controller.pychanges keep retry and timeout behavior predictable. - Tests:
pytest tests/passes; extendtests/when CDA behavior changes. - Secrets: No tokens in repo;
config.pyremains local-only when it holds real credentials.
Public API
- Exported
Stack,ContentType,Query, asset/entry helpers matchREADMEand consumer expectations;contentstack/__init__.py__all__stays accurate when exports change. - Docstrings on
Stackand key public methods when behavior or options change.
Compatibility
- Avoid breaking
Stack.__init__signatures or method chains without a semver strategy; document migration for breaking changes insetup.py/__version__.
HTTP / dependencies
- Changes to
requests, retry behavior, orHTTPSConnectionshould stay consistent withcontentstack/controller.pyandurllib3.Retryusage instack.py.
Security
- No hardcoded tokens in source or docs; no logging of
api_key,delivery_token,preview_token, ormanagement_token.
Severity (optional)
| Level | Examples |
|---|---|
| Blocker | Breaking public API without approval; security issue; no tests for new logic |
| Major | Inconsistent HTTP/retry behavior; README examples that don't match code |
| Minor | Style; minor docs |