Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: json schema #70

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f3bc570
fix(config): add descriptions to JSON schema properties
Keyrxng Nov 26, 2024
1a37aec
chore: config examples
Keyrxng Nov 27, 2024
84eb737
chore: updated manifest.json and dist build
github-actions[bot] Dec 18, 2024
2d14eac
fix: removed `/allow` command
gentlementlegen Dec 17, 2024
c225332
chore: removed unused packages and exports
gentlementlegen Dec 17, 2024
f8b7b6b
chore: changed posted message on insufficient permissions
gentlementlegen Dec 17, 2024
c83c7dd
chore: updated manifest.json and dist build
github-actions[bot] Dec 17, 2024
e5c8843
test: added tests for label set
gentlementlegen Dec 18, 2024
7553e75
test: updated README.md
gentlementlegen Dec 18, 2024
3b5ae0e
chore: fixed knip
gentlementlegen Dec 18, 2024
149a22e
chore: removed commands from manifest.json
gentlementlegen Dec 18, 2024
ecfa4fe
fix!: removed command and Supabase related logic
gentlementlegen Dec 21, 2024
e851998
chore: update lockb file
gentlementlegen Dec 21, 2024
6471fe0
chore: remove supabase from tests
gentlementlegen Dec 21, 2024
434af8c
chore: update packages
gentlementlegen Dec 21, 2024
487eca2
chore: fix tests
gentlementlegen Dec 21, 2024
ad50b46
chore: removed sender username in response to permission issues
gentlementlegen Dec 28, 2024
975fcf0
chore: updated manifest.json and dist build
github-actions[bot] Jan 9, 2025
64d2208
chore: fixed eslint package and errors
gentlementlegen Jan 9, 2025
0993122
chore: fix prettier
gentlementlegen Jan 9, 2025
ced813a
Merge branch 'development' into fix/json-schema
gentlementlegen Jan 9, 2025
47de615
Merge branch 'development' into fix/json-schema
gentlementlegen Jan 9, 2025
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
5 changes: 1 addition & 4 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- uses: oven-sh/setup-bun@v2

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down
Empty file modified bun.lockb
100755 → 100644
Empty file.
3 changes: 0 additions & 3 deletions dist/package.json

This file was deleted.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
"@cspell/dict-node": "^5.0.5",
"@cspell/dict-software-terms": "^4.1.15",
"@cspell/dict-typescript": "^3.1.2",
"@eslint/js": "9.15.0",
"@eslint/js": "9.17.0",
"@jest/globals": "29.7.0",
"@mswjs/data": "0.16.1",
"@types/jest": "29.5.12",
"@types/node": "^20.11.19",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"cross-env": "7.0.3",
"cspell": "^8.4.0",
"eslint": "9.14.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-check-file": "^2.8.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-sonarjs": "^1.0.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-sonarjs": "^3.0.1",
"husky": "^9.0.11",
"jest": "29.7.0",
"jest-junit": "16.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/handle-parent-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export function sortLabelsByValue(labels: Label[]) {
}

export function isParentIssue(body: string) {
const parentPattern = /-\s+\[( |x)\]\s+#\d+/;
return body.match(parentPattern);
const parentPattern = /-\s+\[([ x])]\s+#\d+/;
return RegExp(parentPattern).exec(body);
}
30 changes: 20 additions & 10 deletions src/types/plugin-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,44 @@ import { StaticDecode, Type as T } from "@sinclair/typebox";
export const pluginSettingsSchema = T.Object(
{
globalConfigUpdate: T.Optional(
T.Object({
excludeRepos: T.Array(T.String()),
})
T.Object(
{
excludeRepos: T.Array(T.String(), {
examples: ["repo-name", "no-owner-required"],
description: "List of repositories to exclude from being updated",
}),
},
{ description: "Updates all price labels across all tasks based on `baseRateMultiplier` changes within the config file." }
)
),
labels: T.Object(
{
time: T.Array(
T.Object({
name: T.String({ description: "The display name of the label" }),
collaboratorOnly: T.Boolean({ default: false, description: "Whether the label is only available to collaborators" }),
name: T.String({ examples: ["Time: <2 Hours", "Time: <1 Week"], description: "The display name of the label representing estimated task length" }),
collaboratorOnly: T.Boolean({ default: false, description: "Whether the task is only available for collaborators to be assigned" }),
}),
{ default: [] }
),
priority: T.Array(
T.Object({
name: T.String(),
collaboratorOnly: T.Boolean({ default: false }),
name: T.String({
examples: ["Priority: 1 (Normal)", "Priority: 5 (Emergency)"],
description: "The display name of the label representing task priority",
}),
collaboratorOnly: T.Boolean({ default: false, description: "Whether the task is only available for collaborators to be assigned" }),
}),
{ default: [] }
),
},
{ default: {} }
),
basePriceMultiplier: T.Number({ default: 1 }),
basePriceMultiplier: T.Number({ examples: [1.5], default: 1, description: "The base price multiplier for all tasks" }),
publicAccessControl: T.Object(
{
setLabel: T.Boolean({ default: false }),
fundExternalClosedIssue: T.Boolean({ default: false }),
setLabel: T.Boolean({ default: false, description: "Whether to allow anyone to set labels, false to perform permission validation" }),
fundExternalClosedIssue: T.Boolean({ default: false, description: "Whether to allow funding external closed issues" }),
protectLabels: T.Array(T.String(), { default: ["priority", "price", "time"], uniqueItems: true }),
protectLabels: T.Array(T.String(), { default: ["priority", "price", "time"], uniqueItems: true }),
},
{ default: {} }
Expand Down
Loading