Skip to content

Conversation

@rcantin-w
Copy link
Contributor

@rcantin-w rcantin-w commented Jan 8, 2026

What does this change?

#247

type === 'exhibitions' was repeated a ton so I used the same var for it all too.

I think I could run a reindex without the need for a new pipeline since the display object isn't mapped but shout if you think it's needed

How to test

cd pipeline

Medicine Man: should have isExhibition: true in the display object.
yarn testTransformer --type=event --id=Weoe4SQAAKJwjcDC --isDetailed

HIV and AIDS event: should have isExhibition: false in the display object.
yarn testTransformer --type=event --isDetailed

How can we measure success?

We can identify if it's an Exhibition and therefore we can make sure the link is correct.

Have we considered potential risks?

N/A ?

@rcantin-w rcantin-w requested a review from a team as a code owner January 8, 2026 16:26
@rcantin-w rcantin-w changed the title Add isExhibition to EventDocument display object Add isExhibition to EventDocument display object Jan 8, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an isExhibition boolean field to the EventDocument display object to simplify identifying exhibition-type events. The implementation refactors repeated type === 'exhibitions' checks throughout the transformer by computing isExhibition once and reusing it.

Key changes:

  • Added isExhibition: boolean field to the EventDocument type definition
  • Refactored the eventDocument transformer to use a single isExhibition variable instead of repeated type checks
  • Updated test snapshots to include the new field with correct values (true for exhibitions, false for events)

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pipeline/src/types/transformed/eventDocument.ts Added isExhibition: boolean field to EventDocument type
pipeline/src/transformers/eventDocument.ts Computed isExhibition variable and used it throughout to replace repeated type checks; added field to display object
pipeline/test/transformers/snapshots/eventDocument.test.ts.snap Updated snapshots with isExhibition field - exhibitions show true, events show false
pipeline/test/transformers/snapshots/venues.test.ts.snap Updated venue opening hours and exceptional closure dates (incidental)
pipeline/test/transformers/snapshots/addressables.test.ts.snap Updated with new linked works data (incidental)
pipeline/test/prismic-snapshots/* Updated Prismic API refs, publication dates, and content (incidental test data refresh)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@gestchild gestchild left a comment

Choose a reason for hiding this comment

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

looks good to me and the tests pass

@rcantin-w rcantin-w merged commit 4df96bd into main Jan 9, 2026
11 checks passed
@rcantin-w rcantin-w deleted the exhibition-in-ev branch January 9, 2026 11:41
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.

4 participants