Skip to content

Auto-publish related items when Podcast or Meetup is published#164

Open
Jan0707 wants to merge 2 commits intomainfrom
directus-cascade-publish
Open

Auto-publish related items when Podcast or Meetup is published#164
Jan0707 wants to merge 2 commits intomainfrom
directus-cascade-publish

Conversation

@Jan0707
Copy link
Copy Markdown
Contributor

@Jan0707 Jan0707 commented Apr 14, 2026

Summary

  • Adds a cascade-publish Directus hook that automatically publishes related draft items (speakers, picks of the day, talks) when a Podcast or Meetup is published
  • Prevents incomplete website data caused by a published podcast/meetup referencing unpublished related items
  • Only transitions draftpublished; archived items are left untouched

How it works

When a Podcast or Meetup status is set to published (via create or update), the hook:

  1. Reads the parent item with its nested relations (speakers, picks, talks)
  2. Identifies any related items still in draft status
  3. Batch-updates them to published

Each relation is handled independently — a failure in one does not block the others. On error, a Slack notification is sent with a link to the item.

Cascaded relations

Parent Related items
Podcast Speakers, Picks of the Day
Meetup Speakers, Talks

Interaction with existing hooks

The status update on child items correctly triggers downstream hooks:

  • set-published-on sets the published_on timestamp
  • deploy-website triggers a Vercel deploy
  • algolia-index updates the search index

Test plan

  • Publish a podcast with draft speakers and picks → all cascade to published
  • Publish a meetup with draft speakers and talks → all cascade to published
  • Verify archived related items are not changed
  • Verify already-published items are not re-updated
  • Verify Slack notification on cascade failure

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
programmierbar-website Ready Ready Preview, Comment Apr 14, 2026 1:09pm

Request Review

@Jan0707 Jan0707 requested a review from denbec April 14, 2026 11:58
@Jan0707 Jan0707 self-assigned this Apr 14, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 823bfed744

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant