-
Notifications
You must be signed in to change notification settings - Fork 91
Add @sourcebot/schemas
package
#177
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@sourcebot/schemas", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "yarn generate && tsc", | ||
"generate": "tsx tools/generate.ts", | ||
"postinstall": "yarn build" | ||
}, | ||
"devDependencies": { | ||
"@apidevtools/json-schema-ref-parser": "^11.7.3", | ||
"glob": "^11.0.1", | ||
"json-schema-to-typescript": "^15.0.4", | ||
"tsx": "^4.19.2", | ||
"typescript": "^5.7.3" | ||
}, | ||
"exports": { | ||
"./v2/*": "./dist/v2/*.js", | ||
"./v3/*": "./dist/v3/*.js" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
// THIS IS A AUTO-GENERATED FILE. DO NOT MODIFY MANUALLY! | ||
const schema = { | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"definitions": { | ||
"RepoNameRegexIncludeFilter": { | ||
"type": "string", | ||
"description": "Only clone repos whose name matches the given regexp.", | ||
"format": "regexp", | ||
"default": "^(foo|bar)$" | ||
}, | ||
"RepoNameRegexExcludeFilter": { | ||
"type": "string", | ||
"description": "Don't mirror repos whose names match this regexp.", | ||
"format": "regexp", | ||
"default": "^(fizz|buzz)$" | ||
}, | ||
"ZoektConfig": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/GitHubConfig" | ||
}, | ||
{ | ||
"$ref": "#/definitions/GitLabConfig" | ||
} | ||
] | ||
}, | ||
"GitHubConfig": { | ||
"type": "object", | ||
"properties": { | ||
"Type": { | ||
"const": "github" | ||
}, | ||
"GitHubUrl": { | ||
"type": "string", | ||
"description": "GitHub Enterprise url. If not set github.com will be used as the host." | ||
}, | ||
"GitHubUser": { | ||
"type": "string", | ||
"description": "The GitHub user to mirror" | ||
}, | ||
"GitHubOrg": { | ||
"type": "string", | ||
"description": "The GitHub organization to mirror" | ||
}, | ||
"Name": { | ||
"$ref": "#/definitions/RepoNameRegexIncludeFilter" | ||
}, | ||
"Exclude": { | ||
"$ref": "#/definitions/RepoNameRegexExcludeFilter" | ||
}, | ||
"CredentialPath": { | ||
"type": "string", | ||
"description": "Path to a file containing a GitHub access token.", | ||
"default": "~/.github-token" | ||
}, | ||
"Topics": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "Only mirror repos that have one of the given topics" | ||
}, | ||
"ExcludeTopics": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "Don't mirror repos that have one of the given topics" | ||
}, | ||
"NoArchived": { | ||
"type": "boolean", | ||
"description": "Mirror repos that are _not_ archived", | ||
"default": false | ||
}, | ||
"IncludeForks": { | ||
"type": "boolean", | ||
"description": "Also mirror forks", | ||
"default": false | ||
} | ||
}, | ||
"required": [ | ||
"Type" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"GitLabConfig": { | ||
"type": "object", | ||
"properties": { | ||
"Type": { | ||
"const": "gitlab" | ||
}, | ||
"GitLabURL": { | ||
"type": "string", | ||
"description": "The GitLab API url.", | ||
"default": "https://gitlab.com/api/v4/" | ||
}, | ||
"Name": { | ||
"$ref": "#/definitions/RepoNameRegexIncludeFilter" | ||
}, | ||
"Exclude": { | ||
"$ref": "#/definitions/RepoNameRegexExcludeFilter" | ||
}, | ||
"OnlyPublic": { | ||
"type": "boolean", | ||
"description": "Only mirror public repos", | ||
"default": false | ||
}, | ||
"CredentialPath": { | ||
"type": "string", | ||
"description": "Path to a file containing a GitLab access token.", | ||
"default": "~/.gitlab-token" | ||
} | ||
}, | ||
"required": [ | ||
"Type" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"properties": { | ||
"$schema": { | ||
"type": "string" | ||
}, | ||
"Configs": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ZoektConfig" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"Configs" | ||
], | ||
"additionalProperties": false | ||
} as const; | ||
export { schema as indexSchema }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.