Open
Description
There are some various checks in bin/validate.js
that happen as part of the CI here:
await validateHandles();
await validateTeams();
await validateOrganizations();
await validateFindings();
But one other one that could be helpful is to validate the contests vs. sponsor data to flag any mismatch there. For example if a contest has been added in the main branch, a stale side branch can start getting a sort of cryptic error like:
2:26:22 PM: error Building static HTML failed for path "/contests/2023-03-aragon-protocol-contest"
2:26:22 PM:
2:26:22 PM: 182 | <div className="contest-page__project">
2:26:22 PM: 183 | <div className="contest-page__project-link project-link">
2:26:22 PM: > 184 | <a href={sponsor.link}>
2:26:22 PM: | ^
2:26:22 PM: 185 | <img
2:26:22 PM: 186 | src={sponsor.image.childImageSharp.resize.src}
2:26:22 PM: 187 | alt={sponsor.name}
2:26:22 PM:
2:26:22 PM: WebpackError: TypeError: Cannot read properties of null (reading 'link')
which isn't obvious but basically means the API is returning a contest but the dev branch is missing the sponsor info and avatar. The validate could detect this more directly and flag it in a clearer way to make it easier to troubleshoot.
[Noting that the bigger picture fix might be to keep the two data sources from getting out of sync in the first place, but that might be a longer-term effort.]