Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
chore: added comments for configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Apr 26, 2024
1 parent 06351b8 commit b2a9489
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/types/configuration/common-incentive-config-type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Type, Static } from "@sinclair/typebox";

export const baseIncentiveConfiguration = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean({ default: true }),
});

Expand Down
3 changes: 3 additions & 0 deletions src/types/configuration/content-evaluator-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Static, Type } from "@sinclair/typebox";

export const contentEvaluatorConfigurationType = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean(),
});

Expand Down
3 changes: 3 additions & 0 deletions src/types/configuration/data-purge-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Type, Static } from "@sinclair/typebox";

export const dataPurgeConfigurationType = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean({ default: true }),
});

Expand Down
9 changes: 9 additions & 0 deletions src/types/configuration/formatting-evaluator-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ import { CommentType } from "./comment-types";
const type = Type.Union([...Object.keys(CommentType).map((key) => Type.Literal(key as keyof typeof CommentType))]);

export const formattingEvaluatorConfigurationType = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean({ default: true }),
/**
* Multipliers applied to different parts of the comment body content
*/
multipliers: Type.Array(
Type.Object({
type: Type.Array(type),
formattingMultiplier: Type.Number(),
wordValue: Type.Number(),
})
),
/**
* Attributed score per HTML entity
*/
scores: Type.Record(Type.String(), Type.Number()),
});

Expand Down
9 changes: 9 additions & 0 deletions src/types/configuration/github-comment-config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import { Static, Type } from "@sinclair/typebox";

export const githubCommentConfigurationType = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean({ default: true }),
/**
* Enables posting to the related GitHub Issue
*/
post: Type.Boolean({ default: true }),
/**
* Enables debug by creating a local html file of the rendered comment
*/
debug: Type.Boolean({ default: false }),
});

Expand Down
3 changes: 3 additions & 0 deletions src/types/configuration/permit-generation-configuration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Static, Type } from "@sinclair/typebox";

export const permitGenerationConfigurationType = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean(),
});

Expand Down
6 changes: 6 additions & 0 deletions src/types/configuration/user-extractor-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Static, Type } from "@sinclair/typebox";

export const userExtractorConfigurationType = Type.Object({
/**
* Enables or disabled this module
*/
enabled: Type.Boolean({ default: true }),
/**
* Is the task redeemable, e.g. can the user collect the bounty?
*/
redeemTask: Type.Boolean({ default: true }),
});

Expand Down

0 comments on commit b2a9489

Please sign in to comment.