ubiquity-os / ubiquity-os-kernel

1 stars 13 forks source link

AJV Type Error #4

Closed 0x4007 closed 8 months ago

0x4007 commented 8 months ago

https://github.com/ubiquity/ubiquibot-kernel/blob/de6b510bd412645a595722dd893abd750f7f784f/src/webhooks.ts#L15

TS2339: Property 'errors' does not exist on type '(data: any, { instancePath, parentData, parentDataProperty, rootData }?: { instancePath?: string | undefined; parentData: any; parentDataProperty: any; rootData?: any; }) => boolean'.

Related Telegram conversation https://t.me/UbiquityDAO/29891/31756

0x4007 commented 8 months ago

I just added type checking to the CI so I know that this will be annoying but the solution isn't obvious to me.

0x4007 commented 8 months ago

the issue that made me think if this is even useful is that octokit schemas are not even up to date because there was an additional property in repository called custom_properties which caused ajv to fail validation so I'm thinking we just ditch the ajv validation and use types from @octokit/webhook-types

Perhaps this solution makes the most sense. Hope that you can prioritize this because it gets in the way of building/debugging with cluttered logs.

ubiquibot[bot] commented 8 months ago
! No price label has been set. Skipping permit generation.