Remove unused content-approval Directus hook - #209
Draft
claude[bot] wants to merge 1 commit into
Draft
Conversation
The content-approval hook listened on podcast_generated_content.items.update and copied approved shownotes to the podcast description. Since PR #207 removed the legacy Gemini generator that wrote to podcast_generated_content, shownotes now go straight to podcasts.description, leaving this hook unused. Deletes src/content-approval/ and its entry in the bundle manifest. The shared safeHook helper stays (used by 15 other hooks). schema.json is intentionally untouched (auto-managed by the schema-snapshot workflow).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Requested by Dennis Becker · Slack thread
Before / After
Before: The
content-approvalhook listened onpodcast_generated_content.items.update. When a generated-content row was approved, it promoted the approvedshownotesrow into the episode'spodcasts.description(and flipped the podcast's publishing status once every row was approved). Thepodcast_generated_contentcollection stored the AI-generated drafts that this hook acted on.After: That hook is gone. Since #207 removed the legacy Gemini generator that wrote to
podcast_generated_content, generation now writes shownotes straight to the episode (podcasts.description). Nothing produces or approvespodcast_generated_contentrows anymore, so the approval hook has no purpose.How
directus-cms/extensions/directus-extension-programmierbar-bundle/src/content-approval/(index.ts).directus:extension.entriesindirectus-cms/extensions/directus-extension-programmierbar-bundle/package.json.shared/safeHook.ts, which is still used by 15 other hooks and is kept.npm run buildin the bundle passes.schema.json is intentionally untouched
This PR does not edit
directus-cms/schema.json. That file is auto-managed: theUpdate Directus schema snapshotworkflow periodically pulls the live schema from production (/schema/snapshot) into the repo as a drift-detection snapshot — it is a snapshot / local-dev seed, not something applied to production on deploy (the Directus container just runsdirectus start; only DB migrations run at boot). So editing schema.json here would neither delete anything in prod nor stay in sync with the auto-regenerated file.Sequencing / how to actually delete the collection
Dennis deletes the
podcast_generated_contentcollection manually in the Directus admin after this PR merges. Removing the code hook is safe to do now and does not depend on the collection. Once the collection (and thepodcasts.generated_contentO2M relation) are removed in the admin, the schema-snapshot workflow will drop them fromdirectus-cms/schema.jsonautomatically on its next run, keeping the repo in sync.Note: deleting the collection drops its ~111 existing rows (mostly never-approved AI drafts). That data will be lost — this is expected and intended.
Kept as a DRAFT; nothing auto-merges.
Generated by Claude Code