migration: added webhook version, navigation related fields and allowed_rate_limit for APIToken
Description
This pull request contains model changes :
versionfield has been added in the webhook,feature_toursin WorkspaceUserPropertiesis_navigation_tour_completedin the Profile modelallowed_rate_limitin APIToken
Summary by CodeRabbit
- New Features
- Webhooks now store a persistent version (default "v1") for clearer versioning.
- Profiles record whether the navigation tour has been completed.
- Per-user workspace settings include product-tour flags; existing users are auto-populated with default values.
- API tokens gain a configurable allowed rate limit (default "60/min").
βοΈ Tip: You can customize this high-level summary in your review settings.
π Walkthrough
Walkthrough
Adds four new model fields via a Django migration and bulk-populates one JSON field: Webhook.version (CharField, default "v1"), Profile.is_navigation_tour_completed (BooleanField, default False), WorkspaceUserProperties.product_tour (JSONField, default generator), and APIToken.allowed_rate_limit (CharField, default "60/min").
Changes
| Cohort / File(s) | Summary |
|---|---|
Migration apps/api/plane/db/migrations/0113_webhook_version.py |
New migration (depends on ('db', '0112_auto_20251124_0603')) adding Webhook.version, Profile.is_navigation_tour_completed, WorkspaceUserProperties.product_tour, and APIToken.allowed_rate_limit; defines get_default_product_tour() and populate_product_tour() and runs RunPython(populate_product_tour, reverse_code=migrations.RunPython.noop). |
Webhook model apps/api/plane/db/models/webhook.py |
Adds version = models.CharField(default="v1", max_length=50) to Webhook. |
User/Profile model apps/api/plane/db/models/user.py |
Adds is_navigation_tour_completed = models.BooleanField(default=False) to Profile. |
Workspace models / defaults apps/api/plane/db/models/workspace.py |
Adds get_default_product_tour() (returns {"work_items": True, "cycles": True, "modules": True, "intake": True, "pages": True}) and product_tour = models.JSONField(default=get_default_product_tour) on WorkspaceUserProperties. |
API token model apps/api/plane/db/models/api.py |
Adds allowed_rate_limit = models.CharField(max_length=255, default="60/min") to APIToken. |
Estimated code review effort
π― 3 (Moderate) | β±οΈ ~25 minutes
"I hopped through migrations, leaves in a whirl,
New fields I planted β version, tour, and rate,
A product_tour sprouted for each workspace girl,
Tokens now pace at sixty per minute's gait,
A tiny rabbit applause for this tidy update π"
Pre-merge checks and finishing touches
β Failed checks (2 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | β οΈ Warning | The description covers the key model changes but lacks required sections like Type of Change, Test Scenarios, and References from the template. Only the Description section is partially filled. | Add missing template sections: specify the Type of Change (likely Feature), describe Test Scenarios for validating the new fields, and add any related issue references. |
| Docstring Coverage | β οΈ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
β Passed checks (1 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | β Passed | The title accurately reflects the main changes: adding webhook version field, navigation-related fields, and allowed_rate_limit for APIToken, all present in the changeset. |
β¨ Finishing touches
- [ ] π Generate docstrings
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
migration-webhook
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 @coderabbitai help to get the list of available commands and usage tips.
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 20.
To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.