Added full content management to the API service, Australian date formats and 'work' project aliases. - #283
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
Comment |
|
Code coverage (threshold: 80%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #283 +/- ##
========================================
Coverage 85.84% 85.84%
========================================
Files 18 18
Lines 226 226
========================================
Hits 194 194
Misses 32 32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Checklist before requesting a review
[#123] Verb in past tense.#123added to descriptionChangedsectionChanged
config/default/user.role.do_content_api.ymlpreviously granted create + edit-own only. It now also grantsadminister nodes(labelled "Administer content" in the permissions UI),access content overview,edit anyanddelete anyfor all five bundles (blog,civictheme_alert,civictheme_event,civictheme_page,project),view any unpublished content,view latest version, and every remaining transition of thecivictheme_editorialworkflow (archive,restore,restore_to_draft,restore_to_needs_review,send_back_to_draft). The workflow transitions matter for a non-obvious reason: content_moderation forbids anupdateoutright when the account holds no valid transition out of the entity's current state, so without them archived content was deletable but not editable on every bundle. Verified against real data: all 19 bundle/moderation-state combinations now allow view, update and delete.bypass node accesswas deliberately not used - the role enumerates bundles explicitly so a future content type is a deliberate grant rather than an automatic one.docs/content-api.mdwas rewritten to describe the account accurately, including that the draft-on-create rule covers creation only (an update may publish) and that media access stays narrower; the reconciliation comment indo_content_api.deploy.phpwas updated to match, since the role is no longer least-privilege. A new unit testServiceRolePermissionsTestpins the exported permission array to an exact allow-list plus semantic assertions (every creatable bundle is also editable and deletable, every workflow transition is granted, the role is notis_admin, media edit/delete are withheld).core.date_format.short(m/d/Y - H:i→d/m/Y - H:i),medium(D, m/d/Y - H:i→D, d/m/Y - H:i),fallback(same change as medium), andlong(l, F j, Y - H:i→l, j F Y - H:i).system.date.ymlgainsfirst_day: 1(Monday) andcountry.default: AU; its timezone was alreadyAustralia/Melbourne. Themediumformat is public-facing, not admin-only:core.entity_view_display.node.civictheme_event.default.ymlrenders event date ranges withformat_type: medium. The sevenhtml_*formats are deliberately left as ISO 8601 - they populate thedatetimeattribute of<time>elements and HTML5 date input values, where the format is fixed by specification. A new unit testDateFormatConfigTestrenders every shipped pattern against a fixed reference date (4 August 2026, 14:30) and asserts the exact Australian output, asserts thehtml_*patterns stay ISO, and asserts the regional settings./projects/to/work/.pathauto.pattern.project.ymlchanges from/projects/[node:title]to/work/[node:title], nesting projects under the existing "Our work" landing page already at/work. A new deploy hookdo_base_deploy_move_projects_to_work()indo_base.deploy.phpregenerates existing aliases through pathauto, batched viaHelper::entity()->batchQuery(); its query onpath_aliasdoubles as the idempotency guard, since a regenerated alias no longer matches/projects/%. Becauseredirect.settings.auto_redirectistrue, each rename leaves a 301 behind automatically - verified: 20 aliases moved, 20 301 redirects created, the old URL 301s to the new one, and the new URL returns 200. The XML sitemap needs no extra work because it stores internal paths (/node/N) and resolves aliases at generation time - verified: 18/work/URLs and 0/projects/URLs after regeneration. Behat assertions inproject_content_type.featureandxmlsitemap.featurewere updated, and a newPathautoPatternConfigTestpins each bundle's alias prefix and confirms each pattern is scoped to its own bundle.Screenshots
Before / After