Skip to content

Conversation

@IvanKiral
Copy link
Contributor

Motivation

Which issue does this fix? Fixes #issue number

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

If manual testing is required, what are the steps?

object_type: "content_item";
delivery_slot: WebhookPreviewDeliverySlot;
}
& ({
Copy link
Member

Choose a reason for hiding this comment

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

I would extract the union in the brackets just for readability's sake.

Copy link
Member

Choose a reason for hiding this comment

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

Or even better, create a completely separate ContentItemWorkflowChangedPreviewMessage type similar to ContentItemPublishedMessage and use it in the union at the top.

Copy link
Member

Choose a reason for hiding this comment

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

That would, of course, mean a breaking change considering all the types here are exported publicly through the chain of barrel exports 🙄 So maybe we can wait with this for the full modernisation and for now just extract the union out.

delivery_slot: WebhookDeliverySlot;
};

type ActionContext = {
Copy link
Member

Choose a reason for hiding this comment

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

I would choose a more specific name. Something like ItemWorkflowChangedActionContext?

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.

3 participants