Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ export default (options: Record<string, string>): Context => {
approvalThreshold: config.approvalThreshold,
rejectionThreshold: config.rejectionThreshold,
showRenderErrors: config.showRenderErrors ?? false,
customCSS: (config as any).customCSS
customCSS: (config as any).customCSS,
tags: config.tags || []
},
uploadFilePath: '',
webStaticConfig: [],
Expand Down
1 change: 1 addition & 0 deletions src/lib/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ export default class httpClient {
if (ctx.git?.commitId) form.append('commitId', ctx.git.commitId);
if (ctx.git?.commitAuthor) form.append('commitAuthor', ctx.git.commitAuthor);
if (ctx.git?.commitMessage) form.append('commitMessage', ctx.git.commitMessage);
if (ctx.config.tags?.length) form.append('tags', ctx.config.tags.join(','));

try {
const response = await this.axiosInstance.request({
Expand Down
16 changes: 16 additions & 0 deletions src/lib/schemaValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,22 @@ const ConfigSchema = {
showRenderErrors: {
type: "boolean",
errorMessage: "Invalid config; showRenderErrors must be true/false"
},
tags: {
type: "array",
items: {
type: "string",
minLength: 1,
maxLength: 50,
errorMessage: "Invalid config; each tag must be a non-empty string of at most 50 characters"
},
maxItems: 50,
uniqueItems: true,
errorMessage: {
type: "Invalid config; tags must be an array of strings",
maxItems: "Invalid config; at most 50 tags are allowed",
uniqueItems: "Invalid config; tags must be unique"
}
}
},
anyOf: [
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface Context {
rejectionThreshold?: number;
showRenderErrors?: boolean;
customCSS?: string;
tags?: string[];
};
uploadFilePath: string;
// documents awaiting sync results, filled at upload time so polling knows what to ask for
Expand Down