Skip to content

Commit

Permalink
fix(config): add descriptions to JSON schema properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Nov 26, 2024
1 parent 0b0dabb commit 83a7b65
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/types/plugin-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,41 @@ function mapWebhookToEvent(webhook: WhitelistEvent) {
return roleMap.get(webhook);
}

const EventWhitelistType = T.Union(eventWhitelist.map((event) => T.Literal(event)));

export const pluginSettingsSchema = T.Object(
{
/**
* Delay to send reminders. 0 means disabled. Any other value is counted in days, e.g. 1,5 days
*/
warning: thresholdType({ default: "3.5 days" }),
warning: thresholdType({ default: "3.5 days", description: "Delay to send reminders. 0 means disabled and any other value is counted in days, e.g. 1,5 days" }),
/**
* By default, all repositories are watched. Use this option to opt-out from watching specific repositories
* within your organization. The value is an array of repository names.
*/
watch: T.Object(
{
optOut: T.Array(T.String(), { default: [] }),
optOut: T.Array(T.String(), { default: [], description: "List of repositories to opt-out from watching user activity within the organization" }),
},
{ default: {} }
),
/*
* Whether to rush the follow ups by the priority level
*/
prioritySpeed: T.Boolean({ default: true }),
prioritySpeed: T.Boolean({ default: true, description: "Whether to rush the follow ups by the priority level" }),
/**
* Delay to unassign users. 0 means disabled. Any other value is counted in days, e.g. 7 days
*/
disqualification: thresholdType({
default: "7 days",
description: "Delay to unassign users. 0 means disabled and any other value is counted in days, e.g. 7 days",
}),
/**
* Whether a pull request is required for the given issue on disqualify.
*/
pullRequestRequired: T.Boolean({ default: true }),
pullRequestRequired: T.Boolean({ default: true, description: "Whether a pull request is required for the given issue on disqualify" }),
/**
* List of events to consider as valid activity on a task
*/
eventWhitelist: T.Transform(T.Array(T.String(), { default: eventWhitelist }))
eventWhitelist: T.Transform(T.Array(T.String(), { default: eventWhitelist, description: "List of webhook event names to consider as valid activity on a task" }))
.Decode((value) => {
const validEvents = Object.values(eventWhitelist);
let eventsStripped: TimelineEvent[] = [];
Expand Down

0 comments on commit 83a7b65

Please sign in to comment.