When the issue #24 is merged, we will have JTD schema validation for the message body:
interface CommitBodyMetaData {
job_number?: number
job_commit?: string
}
interface CommitBodyData {
namespace: 'git-queue.commit-body'
version: number
metadata: CommitBodyMetaData
payload: string
}
const CommitBodySchema: JTDSchemaType<CommitBodyData> = {
properties: {
namespace: {enum: ['git-queue.commit-body']},
version: {type: 'int32'},
payload: {type: 'string'},
metadata: {
optionalProperties: {
job_number: {type: 'int32'},
job_commit: {type: 'string'}
},
additionalProperties: true
}
},
additionalProperties: true
}
This allows us to have an expressive description of the commit body, and make validations and parsings more robust and simple.
This methodology should be extended to the commit subject, that will store the queue message.
When the issue #24 is merged, we will have JTD schema validation for the message body:
This allows us to have an expressive description of the commit body, and make validations and parsings more robust and simple.
This methodology should be extended to the commit subject, that will store the queue message.