From 5f1a69f5f4b201acb8e44d2cbcc9c811248d58f2 Mon Sep 17 00:00:00 2001 From: Divyam Talwar Date: Sun, 28 Jun 2026 05:37:28 +0530 Subject: [PATCH 1/4] Let revision configs choose indexed ref ordering Constraint: Issue #1016 has maintainer-approved config names branchSort and tagSort, and existing behavior must remain the default. Rejected: Changing the 64-revision cap or adding per-kind limits | useful follow-up, but broader than the approved sort-control scope. Confidence: high Scope-risk: moderate Directive: Keep date-based revision sorts newest-first so unset config and explicit date config preserve current indexing priority. Tested: node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/backend test src/git.test.ts src/repoIndexManager.test.ts; node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/schemas build; node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/shared build; node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/backend build Not-tested: Full monorepo test suite. --- .../features/search/multi-branch-indexing.mdx | 8 +- .../schemas/v3/azuredevops.schema.mdx | 20 +++ docs/snippets/schemas/v3/bitbucket.schema.mdx | 20 +++ .../snippets/schemas/v3/connection.schema.mdx | 140 ++++++++++++++++++ .../schemas/v3/genericGitHost.schema.mdx | 20 +++ docs/snippets/schemas/v3/gerrit.schema.mdx | 20 +++ docs/snippets/schemas/v3/gitea.schema.mdx | 20 +++ docs/snippets/schemas/v3/github.schema.mdx | 20 +++ docs/snippets/schemas/v3/gitlab.schema.mdx | 20 +++ docs/snippets/schemas/v3/index.schema.mdx | 140 ++++++++++++++++++ docs/snippets/schemas/v3/shared.schema.mdx | 20 +++ packages/backend/src/git.test.ts | 68 +++++++++ packages/backend/src/git.ts | 28 +++- packages/backend/src/repoCompileUtils.ts | 47 +++--- packages/backend/src/repoIndexManager.test.ts | 53 +++++++ packages/backend/src/repoIndexManager.ts | 4 +- packages/schemas/src/v3/azuredevops.schema.ts | 20 +++ packages/schemas/src/v3/azuredevops.type.ts | 8 + packages/schemas/src/v3/bitbucket.schema.ts | 20 +++ packages/schemas/src/v3/bitbucket.type.ts | 8 + packages/schemas/src/v3/connection.schema.ts | 140 ++++++++++++++++++ packages/schemas/src/v3/connection.type.ts | 8 + .../schemas/src/v3/genericGitHost.schema.ts | 20 +++ .../schemas/src/v3/genericGitHost.type.ts | 8 + packages/schemas/src/v3/gerrit.schema.ts | 20 +++ packages/schemas/src/v3/gerrit.type.ts | 8 + packages/schemas/src/v3/gitea.schema.ts | 20 +++ packages/schemas/src/v3/gitea.type.ts | 8 + packages/schemas/src/v3/github.schema.ts | 20 +++ packages/schemas/src/v3/github.type.ts | 8 + packages/schemas/src/v3/gitlab.schema.ts | 20 +++ packages/schemas/src/v3/gitlab.type.ts | 8 + packages/schemas/src/v3/index.schema.ts | 140 ++++++++++++++++++ packages/schemas/src/v3/index.type.ts | 8 + packages/schemas/src/v3/shared.schema.ts | 20 +++ packages/schemas/src/v3/shared.type.ts | 8 + packages/shared/src/types.ts | 12 ++ schemas/v3/shared.json | 22 ++- 38 files changed, 1171 insertions(+), 31 deletions(-) diff --git a/docs/docs/features/search/multi-branch-indexing.mdx b/docs/docs/features/search/multi-branch-indexing.mdx index 9857ed3c0..a6a88bdaa 100644 --- a/docs/docs/features/search/multi-branch-indexing.mdx +++ b/docs/docs/features/search/multi-branch-indexing.mdx @@ -39,6 +39,8 @@ Multi-branch indexing is configured in the [connection](/docs/connections/indexi // Glob patterns "feature/*" // Matches: feature/auth, feature/ui, etc. ], + // Optional. Defaults to "committerdate" (newest first). + "branchSort": "committerdate", // These tags (if they exist): "tags": [ @@ -48,7 +50,9 @@ Multi-branch indexing is configured in the [connection](/docs/connections/indexi // Glob patterns "v3.*.*", // Matches: v3.0.0, v3.0.1, etc. "rc-*" // Matches: rc-1, rc-2, etc. - ] + ], + // Optional. Defaults to "creatordate" (newest first). + "tagSort": "creatordate" } } } @@ -56,6 +60,7 @@ Multi-branch indexing is configured in the [connection](/docs/connections/indexi ``` For each repo defined in the connection, any branches or tags matching the patterns in `branches` and `tags` array will be indexed. +When more matching refs exist than can be indexed, `branchSort` and `tagSort` control which refs are considered first before the 64 revision limit is applied. Supported values are `committerdate`, `creatordate`, and `refname`. Date-based sorts use newest-first ordering; `refname` sorts lexicographically by ref name. ## Search syntax @@ -91,4 +96,3 @@ Additional info: | Gitea | ✅ | | Gerrit | ✅ | | Generic git host | ✅ | - diff --git a/docs/snippets/schemas/v3/azuredevops.schema.mdx b/docs/snippets/schemas/v3/azuredevops.schema.mdx index b3b3d282c..62c468192 100644 --- a/docs/snippets/schemas/v3/azuredevops.schema.mdx +++ b/docs/snippets/schemas/v3/azuredevops.schema.mdx @@ -170,6 +170,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -186,6 +196,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/bitbucket.schema.mdx b/docs/snippets/schemas/v3/bitbucket.schema.mdx index 56895a892..91214a378 100644 --- a/docs/snippets/schemas/v3/bitbucket.schema.mdx +++ b/docs/snippets/schemas/v3/bitbucket.schema.mdx @@ -143,6 +143,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -159,6 +169,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/connection.schema.mdx b/docs/snippets/schemas/v3/connection.schema.mdx index 4671abf74..7b501c0b3 100644 --- a/docs/snippets/schemas/v3/connection.schema.mdx +++ b/docs/snippets/schemas/v3/connection.schema.mdx @@ -186,6 +186,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -202,6 +212,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -397,6 +417,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -413,6 +443,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -561,6 +601,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -577,6 +627,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -677,6 +737,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -693,6 +763,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -856,6 +936,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -872,6 +962,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1073,6 +1173,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1089,6 +1199,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1151,6 +1271,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1167,6 +1297,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/genericGitHost.schema.mdx b/docs/snippets/schemas/v3/genericGitHost.schema.mdx index e9c4b1195..af4d045a2 100644 --- a/docs/snippets/schemas/v3/genericGitHost.schema.mdx +++ b/docs/snippets/schemas/v3/genericGitHost.schema.mdx @@ -41,6 +41,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -57,6 +67,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/gerrit.schema.mdx b/docs/snippets/schemas/v3/gerrit.schema.mdx index cfffb2ec5..e1439694b 100644 --- a/docs/snippets/schemas/v3/gerrit.schema.mdx +++ b/docs/snippets/schemas/v3/gerrit.schema.mdx @@ -81,6 +81,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -97,6 +107,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/gitea.schema.mdx b/docs/snippets/schemas/v3/gitea.schema.mdx index 45e034744..3e4c6016c 100644 --- a/docs/snippets/schemas/v3/gitea.schema.mdx +++ b/docs/snippets/schemas/v3/gitea.schema.mdx @@ -129,6 +129,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -145,6 +155,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/github.schema.mdx b/docs/snippets/schemas/v3/github.schema.mdx index 7d731cdc5..7445ff540 100644 --- a/docs/snippets/schemas/v3/github.schema.mdx +++ b/docs/snippets/schemas/v3/github.schema.mdx @@ -182,6 +182,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -198,6 +208,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/gitlab.schema.mdx b/docs/snippets/schemas/v3/gitlab.schema.mdx index f911c68a7..c3995325a 100644 --- a/docs/snippets/schemas/v3/gitlab.schema.mdx +++ b/docs/snippets/schemas/v3/gitlab.schema.mdx @@ -176,6 +176,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -192,6 +202,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/index.schema.mdx b/docs/snippets/schemas/v3/index.schema.mdx index 864359251..f199840b1 100644 --- a/docs/snippets/schemas/v3/index.schema.mdx +++ b/docs/snippets/schemas/v3/index.schema.mdx @@ -677,6 +677,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -693,6 +703,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -888,6 +908,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -904,6 +934,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1052,6 +1092,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1068,6 +1118,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1168,6 +1228,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1184,6 +1254,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1347,6 +1427,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1363,6 +1453,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1564,6 +1664,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1580,6 +1690,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1642,6 +1762,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1658,6 +1788,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/docs/snippets/schemas/v3/shared.schema.mdx b/docs/snippets/schemas/v3/shared.schema.mdx index 270d85b4b..18b1149ac 100644 --- a/docs/snippets/schemas/v3/shared.schema.mdx +++ b/docs/snippets/schemas/v3/shared.schema.mdx @@ -55,6 +55,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -71,6 +81,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/backend/src/git.test.ts b/packages/backend/src/git.test.ts index c9c32cf57..2229d6e61 100644 --- a/packages/backend/src/git.test.ts +++ b/packages/backend/src/git.test.ts @@ -92,6 +92,32 @@ describe("git ref ordering", () => { expect(tags.indexOf("z-newest")).toBeLessThan(tags.indexOf("a-oldest")); }); + test("getTags supports sorting by ref name", async () => { + const repoPath = await createTempRepo(); + repoPaths.push(repoPath); + + await commitFile({ + repoPath, + fileName: "README.md", + content: "base\n", + message: "initial commit", + timestamp: "2024-01-01T00:00:00Z", + }); + + runGit(repoPath, ["tag", "-a", "a-oldest", "-m", "oldest tag"], { + GIT_COMMITTER_DATE: "2024-01-02T00:00:00Z", + }); + runGit(repoPath, ["tag", "-a", "z-newest", "-m", "newest tag"], { + GIT_COMMITTER_DATE: "2024-01-03T00:00:00Z", + }); + + const tags = await getTags(repoPath, { sort: "refname" }); + + expect(tags).toContain("a-oldest"); + expect(tags).toContain("z-newest"); + expect(tags.indexOf("a-oldest")).toBeLessThan(tags.indexOf("z-newest")); + }); + test("getBranches returns newest branches first by last commit date", async () => { const repoPath = await createTempRepo(); repoPaths.push(repoPath); @@ -133,4 +159,46 @@ describe("git ref ordering", () => { branches.indexOf("aaa-oldest"), ); }); + + test("getBranches supports sorting by ref name", async () => { + const repoPath = await createTempRepo(); + repoPaths.push(repoPath); + + await commitFile({ + repoPath, + fileName: "README.md", + content: "base\n", + message: "initial commit", + timestamp: "2024-01-01T00:00:00Z", + }); + + runGit(repoPath, ["checkout", "-b", "aaa-oldest"]); + await commitFile({ + repoPath, + fileName: "oldest.txt", + content: "oldest\n", + message: "oldest branch commit", + timestamp: "2024-01-02T00:00:00Z", + }); + + runGit(repoPath, ["checkout", "main"]); + runGit(repoPath, ["checkout", "-b", "zzz-newest"]); + await commitFile({ + repoPath, + fileName: "newest.txt", + content: "newest\n", + message: "newest branch commit", + timestamp: "2024-01-03T00:00:00Z", + }); + + runGit(repoPath, ["checkout", "main"]); + + const branches = await getBranches(repoPath, { sort: "refname" }); + + expect(branches).toContain("aaa-oldest"); + expect(branches).toContain("zzz-newest"); + expect(branches.indexOf("aaa-oldest")).toBeLessThan( + branches.indexOf("zzz-newest"), + ); + }); }); diff --git a/packages/backend/src/git.ts b/packages/backend/src/git.ts index d827a5714..40acaad7a 100644 --- a/packages/backend/src/git.ts +++ b/packages/backend/src/git.ts @@ -305,6 +305,16 @@ const parseRefNames = (refs: string) => .map((ref) => ref.trim()) .filter(Boolean); +type GitRevisionSort = "committerdate" | "creatordate" | "refname"; + +const toGitSort = (sort: GitRevisionSort) => { + if (sort === "refname") { + return sort; + } + + return `-${sort}`; +}; + const getSortedRefs = async ({ path, sort, @@ -326,18 +336,28 @@ const getSortedRefs = async ({ ); }; -export const getBranches = async (path: string) => { +export const getBranches = async ( + path: string, + options: { + sort?: GitRevisionSort, + } = {}, +) => { return getSortedRefs({ path, - sort: "-committerdate", + sort: toGitSort(options.sort ?? "committerdate"), refNamespace: "refs/heads", }); }; -export const getTags = async (path: string) => { +export const getTags = async ( + path: string, + options: { + sort?: GitRevisionSort, + } = {}, +) => { return getSortedRefs({ path, - sort: "-creatordate", + sort: toGitSort(options.sort ?? "creatordate"), refNamespace: "refs/tags", }); }; diff --git a/packages/backend/src/repoCompileUtils.ts b/packages/backend/src/repoCompileUtils.ts index 04632a796..75df902cc 100644 --- a/packages/backend/src/repoCompileUtils.ts +++ b/packages/backend/src/repoCompileUtils.ts @@ -32,6 +32,20 @@ const logger = createLogger('repo-compile-utils'); const MAX_CONCURRENT_GIT_OPERATIONS = 100; const gitOperationLimit = pLimit(MAX_CONCURRENT_GIT_OPERATIONS); +const getRevisionMetadata = ( + revisions: { + branches?: string[], + tags?: string[], + branchSort?: RepoMetadata["branchSort"], + tagSort?: RepoMetadata["tagSort"], + } | undefined, +) => ({ + branches: revisions?.branches ?? undefined, + branchSort: revisions?.branchSort ?? undefined, + tags: revisions?.tags ?? undefined, + tagSort: revisions?.tagSort ?? undefined, +} satisfies Pick); + /** * Extracts the host with port from an HTTP(S) URL string, preserving the port * even if it's a default port (e.g., 443 for https, 80 for http). @@ -68,8 +82,7 @@ export const compileGithubConfig = async ( const record = createGitHubRepoRecord({ repo, hostUrl, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + revisions: config.revisions, }) return { @@ -91,14 +104,12 @@ export const compileGithubConfig = async ( export const createGitHubRepoRecord = ({ repo, hostUrl, - branches, - tags, + revisions, isAutoCleanupDisabled, }: { repo: OctokitRepository, hostUrl: string, - branches?: string[], - tags?: string[], + revisions?: Parameters[0], isAutoCleanupDisabled?: boolean, }) => { const repoNameRoot = new URL(hostUrl) @@ -145,8 +156,7 @@ export const createGitHubRepoRecord = ({ 'zoekt.public': marshalBool(isPublic), 'zoekt.display-name': repoDisplayName, }, - branches, - tags, + ...getRevisionMetadata(revisions), codeHostMetadata: { github: { topics: repo.topics ?? [], @@ -226,8 +236,7 @@ export const compileGitlabConfig = async ( 'zoekt.public': marshalBool(isPublic), 'zoekt.display-name': repoDisplayName, }, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), codeHostMetadata: { gitlab: { topics: project.topics ?? [], @@ -301,8 +310,7 @@ export const compileGiteaConfig = async ( 'zoekt.public': marshalBool(isPublic), 'zoekt.display-name': repoDisplayName, }, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), } satisfies RepoMetadata, }; @@ -385,8 +393,7 @@ export const compileGerritConfig = async ( 'zoekt.public': marshalBool(true), 'zoekt.display-name': repoDisplayName, }, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), } satisfies RepoMetadata, }; @@ -537,8 +544,7 @@ export const compileBitbucketConfig = async ( 'zoekt.public': marshalBool(isPublic), 'zoekt.display-name': displayName, }, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), ...(codeHostType === 'bitbucketCloud' ? { codeHostMetadata: { bitbucketCloud: { @@ -674,8 +680,7 @@ export const compileGenericGitHostConfig_file = async ( } }, metadata: { - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), // @NOTE: We don't set a gitConfig here since local repositories // are readonly. gitConfig: undefined, @@ -757,8 +762,7 @@ export const compileGenericGitHostConfig_url = async ( 'zoekt.public': marshalBool(true), 'zoekt.display-name': repoName, }, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), } satisfies RepoMetadata, }; @@ -835,8 +839,7 @@ export const compileAzureDevOpsConfig = async ( 'zoekt.public': marshalBool(isPublic), 'zoekt.display-name': repoDisplayName, }, - branches: config.revisions?.branches ?? undefined, - tags: config.revisions?.tags ?? undefined, + ...getRevisionMetadata(config.revisions), } satisfies RepoMetadata, }; diff --git a/packages/backend/src/repoIndexManager.test.ts b/packages/backend/src/repoIndexManager.test.ts index 684f1a826..38729179f 100644 --- a/packages/backend/src/repoIndexManager.test.ts +++ b/packages/backend/src/repoIndexManager.test.ts @@ -519,6 +519,59 @@ describe('RepoIndexManager', () => { expect(revisions).not.toContain('refs/heads/feature/6'); }); + test('passes configured branch and tag sort values to git ref lookup', async () => { + const repo = createMockRepoWithConnections({ + metadata: { + branches: ['release/**'], + tags: ['v*'], + branchSort: 'refname', + tagSort: 'refname', + }, + }); + (existsSync as Mock).mockReturnValue(true); + (getBranches as Mock).mockResolvedValue(['release/1', 'release/2']); + (getTags as Mock).mockResolvedValue(['v1.0.0', 'v2.0.0']); + + manager = new RepoIndexManager(mockPrisma, mockSettings, mockRedis, mockPromClient as any); + + (mockPrisma.repoIndexingJob.findUniqueOrThrow as Mock).mockResolvedValue({ + status: RepoIndexingJobStatus.PENDING, + }); + (mockPrisma.repoIndexingJob.update as Mock).mockResolvedValue({ + type: RepoIndexingJobType.INDEX, + repo, + }); + + const mockJob = { + data: { + jobId: 'job-1', + type: 'INDEX', + repoId: repo.id, + repoName: repo.name, + }, + moveToDelayed: vi.fn(), + } as unknown as Job; + + const { Worker } = await import('bullmq'); + const processor = (Worker as unknown as Mock).mock.calls[0][1]; + await processor(mockJob); + + expect(getBranches).toHaveBeenCalledWith('/test-data/repos/1', { sort: 'refname' }); + expect(getTags).toHaveBeenCalledWith('/test-data/repos/1', { sort: 'refname' }); + expect(indexGitRepository).toHaveBeenCalledWith( + repo, + mockSettings, + [ + 'refs/heads/main', + 'refs/heads/release/1', + 'refs/heads/release/2', + 'refs/tags/v1.0.0', + 'refs/tags/v2.0.0', + ], + expect.any(Object) + ); + }); + test('updates repo.indexedAt and indexedCommitHash on completion', async () => { const repo = createMockRepoWithConnections(); (existsSync as Mock).mockReturnValue(true); diff --git a/packages/backend/src/repoIndexManager.ts b/packages/backend/src/repoIndexManager.ts index aea1291dc..a34110312 100644 --- a/packages/backend/src/repoIndexManager.ts +++ b/packages/backend/src/repoIndexManager.ts @@ -471,7 +471,7 @@ export class RepoIndexManager { if (metadata.branches) { const branchGlobs = metadata.branches - const allBranches = await getBranches(repoPath); + const allBranches = await getBranches(repoPath, { sort: metadata.branchSort }); const matchingBranches = allBranches .filter((branch) => micromatch.isMatch(branch, branchGlobs)) @@ -485,7 +485,7 @@ export class RepoIndexManager { if (metadata.tags) { const tagGlobs = metadata.tags; - const allTags = await getTags(repoPath); + const allTags = await getTags(repoPath, { sort: metadata.tagSort }); const matchingTags = allTags .filter((tag) => micromatch.isMatch(tag, tagGlobs)) diff --git a/packages/schemas/src/v3/azuredevops.schema.ts b/packages/schemas/src/v3/azuredevops.schema.ts index 8b730bda5..d524219ca 100644 --- a/packages/schemas/src/v3/azuredevops.schema.ts +++ b/packages/schemas/src/v3/azuredevops.schema.ts @@ -169,6 +169,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -185,6 +195,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/azuredevops.type.ts b/packages/schemas/src/v3/azuredevops.type.ts index 28f35f1ad..8d4161d47 100644 --- a/packages/schemas/src/v3/azuredevops.type.ts +++ b/packages/schemas/src/v3/azuredevops.type.ts @@ -90,8 +90,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/bitbucket.schema.ts b/packages/schemas/src/v3/bitbucket.schema.ts index 11bbb3221..4fead3866 100644 --- a/packages/schemas/src/v3/bitbucket.schema.ts +++ b/packages/schemas/src/v3/bitbucket.schema.ts @@ -142,6 +142,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -158,6 +168,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/bitbucket.type.ts b/packages/schemas/src/v3/bitbucket.type.ts index ee5647064..293f389c9 100644 --- a/packages/schemas/src/v3/bitbucket.type.ts +++ b/packages/schemas/src/v3/bitbucket.type.ts @@ -85,8 +85,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/connection.schema.ts b/packages/schemas/src/v3/connection.schema.ts index c539e918d..128396d6f 100644 --- a/packages/schemas/src/v3/connection.schema.ts +++ b/packages/schemas/src/v3/connection.schema.ts @@ -185,6 +185,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -201,6 +211,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -396,6 +416,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -412,6 +442,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -560,6 +600,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -576,6 +626,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -676,6 +736,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -692,6 +762,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -855,6 +935,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -871,6 +961,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1072,6 +1172,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1088,6 +1198,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1150,6 +1270,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1166,6 +1296,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/connection.type.ts b/packages/schemas/src/v3/connection.type.ts index fbfb16570..85c31afec 100644 --- a/packages/schemas/src/v3/connection.type.ts +++ b/packages/schemas/src/v3/connection.type.ts @@ -101,10 +101,18 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } export interface GitlabConnectionConfig { /** diff --git a/packages/schemas/src/v3/genericGitHost.schema.ts b/packages/schemas/src/v3/genericGitHost.schema.ts index 8cebd9cd4..db49b2431 100644 --- a/packages/schemas/src/v3/genericGitHost.schema.ts +++ b/packages/schemas/src/v3/genericGitHost.schema.ts @@ -40,6 +40,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -56,6 +66,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/genericGitHost.type.ts b/packages/schemas/src/v3/genericGitHost.type.ts index e1ce579b3..2a38cc6db 100644 --- a/packages/schemas/src/v3/genericGitHost.type.ts +++ b/packages/schemas/src/v3/genericGitHost.type.ts @@ -27,8 +27,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/gerrit.schema.ts b/packages/schemas/src/v3/gerrit.schema.ts index d37968873..aaec56a9c 100644 --- a/packages/schemas/src/v3/gerrit.schema.ts +++ b/packages/schemas/src/v3/gerrit.schema.ts @@ -80,6 +80,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -96,6 +106,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/gerrit.type.ts b/packages/schemas/src/v3/gerrit.type.ts index 360a61e70..b8b935d1f 100644 --- a/packages/schemas/src/v3/gerrit.type.ts +++ b/packages/schemas/src/v3/gerrit.type.ts @@ -45,8 +45,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/gitea.schema.ts b/packages/schemas/src/v3/gitea.schema.ts index 6626b1992..e28fd13f8 100644 --- a/packages/schemas/src/v3/gitea.schema.ts +++ b/packages/schemas/src/v3/gitea.schema.ts @@ -128,6 +128,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -144,6 +154,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/gitea.type.ts b/packages/schemas/src/v3/gitea.type.ts index dbdeeb8c5..443b90dbd 100644 --- a/packages/schemas/src/v3/gitea.type.ts +++ b/packages/schemas/src/v3/gitea.type.ts @@ -69,8 +69,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/github.schema.ts b/packages/schemas/src/v3/github.schema.ts index 93c61ba90..b4c17bc87 100644 --- a/packages/schemas/src/v3/github.schema.ts +++ b/packages/schemas/src/v3/github.schema.ts @@ -181,6 +181,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -197,6 +207,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/github.type.ts b/packages/schemas/src/v3/github.type.ts index f7cdf4a2d..c0a0942d7 100644 --- a/packages/schemas/src/v3/github.type.ts +++ b/packages/schemas/src/v3/github.type.ts @@ -92,8 +92,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/gitlab.schema.ts b/packages/schemas/src/v3/gitlab.schema.ts index 78412a054..88d801013 100644 --- a/packages/schemas/src/v3/gitlab.schema.ts +++ b/packages/schemas/src/v3/gitlab.schema.ts @@ -175,6 +175,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -191,6 +201,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/gitlab.type.ts b/packages/schemas/src/v3/gitlab.type.ts index b73372105..4e1113a53 100644 --- a/packages/schemas/src/v3/gitlab.type.ts +++ b/packages/schemas/src/v3/gitlab.type.ts @@ -87,8 +87,16 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/index.schema.ts b/packages/schemas/src/v3/index.schema.ts index 8c1d64b52..ab9ea09fd 100644 --- a/packages/schemas/src/v3/index.schema.ts +++ b/packages/schemas/src/v3/index.schema.ts @@ -676,6 +676,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -692,6 +702,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -887,6 +907,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -903,6 +933,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1051,6 +1091,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1067,6 +1117,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1167,6 +1227,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1183,6 +1253,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1346,6 +1426,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1362,6 +1452,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1563,6 +1663,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1579,6 +1689,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -1641,6 +1761,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -1657,6 +1787,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/index.type.ts b/packages/schemas/src/v3/index.type.ts index 7fa7f5a17..7b60fed0a 100644 --- a/packages/schemas/src/v3/index.type.ts +++ b/packages/schemas/src/v3/index.type.ts @@ -328,10 +328,18 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } export interface GitlabConnectionConfig { /** diff --git a/packages/schemas/src/v3/shared.schema.ts b/packages/schemas/src/v3/shared.schema.ts index 91a34529b..12a86dc8c 100644 --- a/packages/schemas/src/v3/shared.schema.ts +++ b/packages/schemas/src/v3/shared.schema.ts @@ -54,6 +54,16 @@ const schema = { ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -70,6 +80,16 @@ const schema = { ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false diff --git a/packages/schemas/src/v3/shared.type.ts b/packages/schemas/src/v3/shared.type.ts index 043d1c80c..0c752c87c 100644 --- a/packages/schemas/src/v3/shared.type.ts +++ b/packages/schemas/src/v3/shared.type.ts @@ -32,10 +32,18 @@ export interface GitRevisions { * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. */ branches?: string[]; + /** + * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + branchSort?: "committerdate" | "creatordate" | "refname"; /** * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. */ tags?: string[]; + /** + * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + */ + tagSort?: "committerdate" | "creatordate" | "refname"; } /** * Optional headers to use with the model. diff --git a/packages/shared/src/types.ts b/packages/shared/src/types.ts index 5951bab6b..1426929ba 100644 --- a/packages/shared/src/types.ts +++ b/packages/shared/src/types.ts @@ -3,6 +3,8 @@ import { z } from "zod"; export type ConfigSettings = Required; +const gitRevisionSortSchema = z.enum(["committerdate", "creatordate", "refname"]); + // Structure of the `metadata` field in the `Repo` table. // // @WARNING: If you modify this schema, please make sure it is backwards @@ -22,11 +24,21 @@ export const repoMetadataSchema = z.object({ */ branches: z.array(z.string()).optional(), + /** + * Sort order to use before matching and truncating branches. + */ + branchSort: gitRevisionSortSchema.optional(), + /** * A list of tags to index. Glob patterns are supported. */ tags: z.array(z.string()).optional(), + /** + * Sort order to use before matching and truncating tags. + */ + tagSort: gitRevisionSortSchema.optional(), + /** * A list of revisions that were indexed for the repo. */ diff --git a/schemas/v3/shared.json b/schemas/v3/shared.json index c45c834f0..d0ac8aecb 100644 --- a/schemas/v3/shared.json +++ b/schemas/v3/shared.json @@ -53,6 +53,16 @@ ], "default": [] }, + "branchSort": { + "type": "string", + "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "committerdate" + }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", @@ -69,6 +79,16 @@ ] ], "default": [] + }, + "tagSort": { + "type": "string", + "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "enum": [ + "committerdate", + "creatordate", + "refname" + ], + "default": "creatordate" } }, "additionalProperties": false @@ -108,4 +128,4 @@ "additionalProperties": false } } -} \ No newline at end of file +} From f9584cc16395dbc88664f0470b285342bd4976f8 Mon Sep 17 00:00:00 2001 From: Divyam Talwar Date: Sun, 28 Jun 2026 05:38:13 +0530 Subject: [PATCH 2/4] Record revision sort config in release notes Constraint: Sourcebot requires every non-doc PR to add an Unreleased changelog entry that links to the PR. Confidence: high Scope-risk: narrow Directive: Keep schema/config additions under Added unless they are pure fixes. Tested: Changelog format matched adjacent Unreleased Added entries. Not-tested: No code tests run for changelog-only commit. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0725af08..3176cf216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [EE] Added mermaid diagram rendering to Ask Sourcebot answers, with pan/zoom, copy/export, in-thread deep links, and an interleaved right-panel view. [#1369](https://github.com/sourcebot-dev/sourcebot/pull/1369) - [EE] Added a context-window usage gauge to the Ask Sourcebot chat details, showing how much of the selected model's context window each turn occupies. Window sizes are resolved from the models.dev catalog. [#1370](https://github.com/sourcebot-dev/sourcebot/pull/1370) - Added language model input-modality and document capability resolution, automatically resolved from the models.dev catalog (falls back to text-only for uncatalogued/self-hosted models). [#1372](https://github.com/sourcebot-dev/sourcebot/pull/1372) +- Added `revisions.branchSort` and `revisions.tagSort` config options for controlling which matching refs are indexed first. [#1379](https://github.com/sourcebot-dev/sourcebot/pull/1379) ### Fixed - Send anonymous server-side PostHog events as personless so unauthenticated requests don't inflate person counts. [#1367](https://github.com/sourcebot-dev/sourcebot/pull/1367) From 7e21fc45a601ba86dd25268b84b07ffa4256c0af Mon Sep 17 00:00:00 2001 From: Divyam Talwar Date: Sun, 28 Jun 2026 06:40:20 +0530 Subject: [PATCH 3/4] Align revision sort docs with indexing limits Clarify that Sourcebot applies one global revision budget after the default branch, then matching branches, then matching tags. Add a mixed branch/tag overflow regression so future changes cannot accidentally present branch and tag limits as independent. Constraint: Existing runtime behavior has a 64 total revision cap including the default branch, with matching branches considered before matching tags. Rejected: Changing selection semantics in this PR | larger behavioral change than the scoped sort-configuration fix and would need maintainer direction. Confidence: high Scope-risk: moderate Directive: Do not describe branch and tag caps as independent; tags can be skipped when branches fill the revision budget. Tested: node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/backend test src/git.test.ts src/repoIndexManager.test.ts; node .yarn/releases/yarn-4.7.0.cjs build:deps; node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/backend build; rg stale 64 branch/tag wording; git diff --check. Not-tested: Full monorepo test suite. --- .../features/search/multi-branch-indexing.mdx | 8 ++- .../schemas/v3/azuredevops.schema.mdx | 10 +-- docs/snippets/schemas/v3/bitbucket.schema.mdx | 10 +-- .../snippets/schemas/v3/connection.schema.mdx | 70 +++++++++---------- .../schemas/v3/genericGitHost.schema.mdx | 10 +-- docs/snippets/schemas/v3/gerrit.schema.mdx | 10 +-- docs/snippets/schemas/v3/gitea.schema.mdx | 10 +-- docs/snippets/schemas/v3/github.schema.mdx | 10 +-- docs/snippets/schemas/v3/gitlab.schema.mdx | 10 +-- docs/snippets/schemas/v3/index.schema.mdx | 70 +++++++++---------- docs/snippets/schemas/v3/shared.schema.mdx | 10 +-- packages/backend/src/repoIndexManager.test.ts | 54 ++++++++++++++ packages/backend/src/repoIndexManager.ts | 2 +- packages/schemas/src/v3/azuredevops.schema.ts | 10 +-- packages/schemas/src/v3/azuredevops.type.ts | 10 +-- packages/schemas/src/v3/bitbucket.schema.ts | 10 +-- packages/schemas/src/v3/bitbucket.type.ts | 10 +-- packages/schemas/src/v3/connection.schema.ts | 70 +++++++++---------- packages/schemas/src/v3/connection.type.ts | 10 +-- .../schemas/src/v3/genericGitHost.schema.ts | 10 +-- .../schemas/src/v3/genericGitHost.type.ts | 10 +-- packages/schemas/src/v3/gerrit.schema.ts | 10 +-- packages/schemas/src/v3/gerrit.type.ts | 10 +-- packages/schemas/src/v3/gitea.schema.ts | 10 +-- packages/schemas/src/v3/gitea.type.ts | 10 +-- packages/schemas/src/v3/github.schema.ts | 10 +-- packages/schemas/src/v3/github.type.ts | 10 +-- packages/schemas/src/v3/gitlab.schema.ts | 10 +-- packages/schemas/src/v3/gitlab.type.ts | 10 +-- packages/schemas/src/v3/index.schema.ts | 70 +++++++++---------- packages/schemas/src/v3/index.type.ts | 10 +-- packages/schemas/src/v3/shared.schema.ts | 10 +-- packages/schemas/src/v3/shared.type.ts | 10 +-- schemas/v3/shared.json | 10 +-- 34 files changed, 335 insertions(+), 279 deletions(-) diff --git a/docs/docs/features/search/multi-branch-indexing.mdx b/docs/docs/features/search/multi-branch-indexing.mdx index a6a88bdaa..de8891286 100644 --- a/docs/docs/features/search/multi-branch-indexing.mdx +++ b/docs/docs/features/search/multi-branch-indexing.mdx @@ -12,7 +12,7 @@ By default, only the default branch of a repository is indexed and can be search ## Configuration -Multi-branch indexing is currently limited to 64 branches and tags. Please see [this issue](https://github.com/sourcebot-dev/sourcebot/issues/461) for more details. +Multi-branch indexing is currently limited to 64 total revisions per repository, including the default branch. Sourcebot indexes the default branch first, then matching branches, then matching tags. Please see [this issue](https://github.com/sourcebot-dev/sourcebot/issues/461) for more details. Multi-branch indexing is configured in the [connection](/docs/connections/indexing-your-code) using the `revisions.branches` and `revisions.tags` arrays. Glob patterns are supported. For example: @@ -59,8 +59,10 @@ Multi-branch indexing is configured in the [connection](/docs/connections/indexi } ``` -For each repo defined in the connection, any branches or tags matching the patterns in `branches` and `tags` array will be indexed. -When more matching refs exist than can be indexed, `branchSort` and `tagSort` control which refs are considered first before the 64 revision limit is applied. Supported values are `committerdate`, `creatordate`, and `refname`. Date-based sorts use newest-first ordering; `refname` sorts lexicographically by ref name. +For each repo defined in the connection, any branches or tags matching the patterns in the `branches` and `tags` arrays will be considered for indexing. +When more matching refs exist than can be indexed, Sourcebot keeps the default branch first, then adds matching branches using `branchSort`, then adds matching tags using `tagSort`, and finally truncates the combined list to 64 total revisions. If matching branches fill the revision budget, matching tags may be skipped. + +Supported sort values are `committerdate`, `creatordate`, and `refname`. These map to Git `for-each-ref` sort keys. Date-based sorts use newest-first ordering; `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. ## Search syntax diff --git a/docs/snippets/schemas/v3/azuredevops.schema.mdx b/docs/snippets/schemas/v3/azuredevops.schema.mdx index 62c468192..82330597a 100644 --- a/docs/snippets/schemas/v3/azuredevops.schema.mdx +++ b/docs/snippets/schemas/v3/azuredevops.schema.mdx @@ -151,11 +151,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -172,7 +172,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -182,7 +182,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -199,7 +199,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/bitbucket.schema.mdx b/docs/snippets/schemas/v3/bitbucket.schema.mdx index 91214a378..656e193b5 100644 --- a/docs/snippets/schemas/v3/bitbucket.schema.mdx +++ b/docs/snippets/schemas/v3/bitbucket.schema.mdx @@ -124,11 +124,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -145,7 +145,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -155,7 +155,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -172,7 +172,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/connection.schema.mdx b/docs/snippets/schemas/v3/connection.schema.mdx index 7b501c0b3..2c66098ed 100644 --- a/docs/snippets/schemas/v3/connection.schema.mdx +++ b/docs/snippets/schemas/v3/connection.schema.mdx @@ -167,11 +167,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -188,7 +188,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -198,7 +198,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -215,7 +215,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -398,11 +398,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -419,7 +419,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -429,7 +429,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -446,7 +446,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -582,11 +582,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -603,7 +603,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -613,7 +613,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -630,7 +630,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -718,11 +718,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -739,7 +739,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -749,7 +749,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -766,7 +766,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -917,11 +917,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -938,7 +938,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -948,7 +948,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -965,7 +965,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1154,11 +1154,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1175,7 +1175,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1185,7 +1185,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1202,7 +1202,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1252,11 +1252,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1273,7 +1273,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1283,7 +1283,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1300,7 +1300,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/genericGitHost.schema.mdx b/docs/snippets/schemas/v3/genericGitHost.schema.mdx index af4d045a2..cd44a82a2 100644 --- a/docs/snippets/schemas/v3/genericGitHost.schema.mdx +++ b/docs/snippets/schemas/v3/genericGitHost.schema.mdx @@ -22,11 +22,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -43,7 +43,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -53,7 +53,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -70,7 +70,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/gerrit.schema.mdx b/docs/snippets/schemas/v3/gerrit.schema.mdx index e1439694b..18f490bb7 100644 --- a/docs/snippets/schemas/v3/gerrit.schema.mdx +++ b/docs/snippets/schemas/v3/gerrit.schema.mdx @@ -62,11 +62,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -83,7 +83,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -93,7 +93,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -110,7 +110,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/gitea.schema.mdx b/docs/snippets/schemas/v3/gitea.schema.mdx index 3e4c6016c..1f9d83d15 100644 --- a/docs/snippets/schemas/v3/gitea.schema.mdx +++ b/docs/snippets/schemas/v3/gitea.schema.mdx @@ -110,11 +110,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -131,7 +131,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -141,7 +141,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -158,7 +158,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/github.schema.mdx b/docs/snippets/schemas/v3/github.schema.mdx index 7445ff540..f3955a3cb 100644 --- a/docs/snippets/schemas/v3/github.schema.mdx +++ b/docs/snippets/schemas/v3/github.schema.mdx @@ -163,11 +163,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -184,7 +184,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -194,7 +194,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -211,7 +211,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/gitlab.schema.mdx b/docs/snippets/schemas/v3/gitlab.schema.mdx index c3995325a..1aa497a89 100644 --- a/docs/snippets/schemas/v3/gitlab.schema.mdx +++ b/docs/snippets/schemas/v3/gitlab.schema.mdx @@ -157,11 +157,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -178,7 +178,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -188,7 +188,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -205,7 +205,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/index.schema.mdx b/docs/snippets/schemas/v3/index.schema.mdx index f199840b1..d1d89feb0 100644 --- a/docs/snippets/schemas/v3/index.schema.mdx +++ b/docs/snippets/schemas/v3/index.schema.mdx @@ -658,11 +658,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -679,7 +679,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -689,7 +689,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -706,7 +706,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -889,11 +889,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -910,7 +910,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -920,7 +920,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -937,7 +937,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1073,11 +1073,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1094,7 +1094,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1104,7 +1104,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1121,7 +1121,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1209,11 +1209,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1230,7 +1230,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1240,7 +1240,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1257,7 +1257,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1408,11 +1408,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1429,7 +1429,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1439,7 +1439,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1456,7 +1456,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1645,11 +1645,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1666,7 +1666,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1676,7 +1676,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1693,7 +1693,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1743,11 +1743,11 @@ }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1764,7 +1764,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1774,7 +1774,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1791,7 +1791,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/docs/snippets/schemas/v3/shared.schema.mdx b/docs/snippets/schemas/v3/shared.schema.mdx index 18b1149ac..9ed157d55 100644 --- a/docs/snippets/schemas/v3/shared.schema.mdx +++ b/docs/snippets/schemas/v3/shared.schema.mdx @@ -36,11 +36,11 @@ }, "GitRevisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -57,7 +57,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -67,7 +67,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -84,7 +84,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/backend/src/repoIndexManager.test.ts b/packages/backend/src/repoIndexManager.test.ts index 38729179f..db6045959 100644 --- a/packages/backend/src/repoIndexManager.test.ts +++ b/packages/backend/src/repoIndexManager.test.ts @@ -519,6 +519,60 @@ describe('RepoIndexManager', () => { expect(revisions).not.toContain('refs/heads/feature/6'); }); + test('truncates mixed branch and tag revisions after default branch and matching branches', async () => { + const matchingBranches = Array.from( + { length: 70 }, + (_, index) => `feature/${String(index + 1).padStart(2, '0')}`, + ); + const repo = createMockRepoWithConnections({ + metadata: { + branches: ['feature/**'], + tags: ['v*'], + branchSort: 'refname', + tagSort: 'refname', + }, + }); + (existsSync as Mock).mockReturnValue(true); + (getBranches as Mock).mockResolvedValue(matchingBranches); + (getTags as Mock).mockResolvedValue(['v1.0.0', 'v2.0.0']); + + manager = new RepoIndexManager(mockPrisma, mockSettings, mockRedis, mockPromClient as any); + + (mockPrisma.repoIndexingJob.findUniqueOrThrow as Mock).mockResolvedValue({ + status: RepoIndexingJobStatus.PENDING, + }); + (mockPrisma.repoIndexingJob.update as Mock).mockResolvedValue({ + type: RepoIndexingJobType.INDEX, + repo, + }); + + const mockJob = { + data: { + jobId: 'job-1', + type: 'INDEX', + repoId: repo.id, + repoName: repo.name, + }, + moveToDelayed: vi.fn(), + } as unknown as Job; + + const { Worker } = await import('bullmq'); + const processor = (Worker as unknown as Mock).mock.calls[0][1]; + await processor(mockJob); + + const revisions = (indexGitRepository as Mock).mock.calls.at(-1)?.[2] as string[]; + + expect(getBranches).toHaveBeenCalledWith('/test-data/repos/1', { sort: 'refname' }); + expect(getTags).toHaveBeenCalledWith('/test-data/repos/1', { sort: 'refname' }); + expect(revisions).toHaveLength(64); + expect(revisions[0]).toBe('refs/heads/main'); + expect(revisions).toContain('refs/heads/feature/01'); + expect(revisions).toContain('refs/heads/feature/63'); + expect(revisions).not.toContain('refs/heads/feature/64'); + expect(revisions).not.toContain('refs/tags/v1.0.0'); + expect(revisions).not.toContain('refs/tags/v2.0.0'); + }); + test('passes configured branch and tag sort values to git ref lookup', async () => { const repo = createMockRepoWithConnections({ metadata: { diff --git a/packages/backend/src/repoIndexManager.ts b/packages/backend/src/repoIndexManager.ts index a34110312..7e305cd83 100644 --- a/packages/backend/src/repoIndexManager.ts +++ b/packages/backend/src/repoIndexManager.ts @@ -500,7 +500,7 @@ export class RepoIndexManager { // De-duplicate revisions to ensure we don't have duplicate branches/tags revisions = [...new Set(revisions)]; - // zoekt has a limit of 64 branches/tags to index. + // zoekt has a limit of 64 total revisions to index, including the default branch. if (revisions.length > 64) { logger.warn(`Too many revisions (${revisions.length}) for repo ${repo.id}, truncating to 64`); captureEvent('backend_revisions_truncated', { diff --git a/packages/schemas/src/v3/azuredevops.schema.ts b/packages/schemas/src/v3/azuredevops.schema.ts index d524219ca..9f48211c9 100644 --- a/packages/schemas/src/v3/azuredevops.schema.ts +++ b/packages/schemas/src/v3/azuredevops.schema.ts @@ -150,11 +150,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -171,7 +171,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -181,7 +181,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -198,7 +198,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/azuredevops.type.ts b/packages/schemas/src/v3/azuredevops.type.ts index 8d4161d47..af6f51b0f 100644 --- a/packages/schemas/src/v3/azuredevops.type.ts +++ b/packages/schemas/src/v3/azuredevops.type.ts @@ -83,23 +83,23 @@ export interface AzureDevOpsConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/bitbucket.schema.ts b/packages/schemas/src/v3/bitbucket.schema.ts index 4fead3866..cb40cd9a4 100644 --- a/packages/schemas/src/v3/bitbucket.schema.ts +++ b/packages/schemas/src/v3/bitbucket.schema.ts @@ -123,11 +123,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -144,7 +144,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -154,7 +154,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -171,7 +171,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/bitbucket.type.ts b/packages/schemas/src/v3/bitbucket.type.ts index 293f389c9..b41ec7437 100644 --- a/packages/schemas/src/v3/bitbucket.type.ts +++ b/packages/schemas/src/v3/bitbucket.type.ts @@ -78,23 +78,23 @@ export interface BitbucketConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/connection.schema.ts b/packages/schemas/src/v3/connection.schema.ts index 128396d6f..33e7d736e 100644 --- a/packages/schemas/src/v3/connection.schema.ts +++ b/packages/schemas/src/v3/connection.schema.ts @@ -166,11 +166,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -187,7 +187,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -197,7 +197,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -214,7 +214,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -397,11 +397,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -418,7 +418,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -428,7 +428,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -445,7 +445,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -581,11 +581,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -602,7 +602,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -612,7 +612,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -629,7 +629,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -717,11 +717,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -738,7 +738,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -748,7 +748,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -765,7 +765,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -916,11 +916,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -937,7 +937,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -947,7 +947,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -964,7 +964,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1153,11 +1153,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1174,7 +1174,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1184,7 +1184,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1201,7 +1201,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1251,11 +1251,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1272,7 +1272,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1282,7 +1282,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1299,7 +1299,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/connection.type.ts b/packages/schemas/src/v3/connection.type.ts index 85c31afec..e47609e0e 100644 --- a/packages/schemas/src/v3/connection.type.ts +++ b/packages/schemas/src/v3/connection.type.ts @@ -94,23 +94,23 @@ export interface GithubConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/genericGitHost.schema.ts b/packages/schemas/src/v3/genericGitHost.schema.ts index db49b2431..2c833b690 100644 --- a/packages/schemas/src/v3/genericGitHost.schema.ts +++ b/packages/schemas/src/v3/genericGitHost.schema.ts @@ -21,11 +21,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -42,7 +42,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -52,7 +52,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -69,7 +69,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/genericGitHost.type.ts b/packages/schemas/src/v3/genericGitHost.type.ts index 2a38cc6db..026809d96 100644 --- a/packages/schemas/src/v3/genericGitHost.type.ts +++ b/packages/schemas/src/v3/genericGitHost.type.ts @@ -20,23 +20,23 @@ export interface GenericGitHostConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/gerrit.schema.ts b/packages/schemas/src/v3/gerrit.schema.ts index aaec56a9c..f99f1da05 100644 --- a/packages/schemas/src/v3/gerrit.schema.ts +++ b/packages/schemas/src/v3/gerrit.schema.ts @@ -61,11 +61,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -82,7 +82,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -92,7 +92,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -109,7 +109,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/gerrit.type.ts b/packages/schemas/src/v3/gerrit.type.ts index b8b935d1f..655fbec48 100644 --- a/packages/schemas/src/v3/gerrit.type.ts +++ b/packages/schemas/src/v3/gerrit.type.ts @@ -38,23 +38,23 @@ export interface GerritConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/gitea.schema.ts b/packages/schemas/src/v3/gitea.schema.ts index e28fd13f8..924e5bf92 100644 --- a/packages/schemas/src/v3/gitea.schema.ts +++ b/packages/schemas/src/v3/gitea.schema.ts @@ -109,11 +109,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -130,7 +130,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -140,7 +140,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -157,7 +157,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/gitea.type.ts b/packages/schemas/src/v3/gitea.type.ts index 443b90dbd..f761ffb54 100644 --- a/packages/schemas/src/v3/gitea.type.ts +++ b/packages/schemas/src/v3/gitea.type.ts @@ -62,23 +62,23 @@ export interface GiteaConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/github.schema.ts b/packages/schemas/src/v3/github.schema.ts index b4c17bc87..9b9713d3f 100644 --- a/packages/schemas/src/v3/github.schema.ts +++ b/packages/schemas/src/v3/github.schema.ts @@ -162,11 +162,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -183,7 +183,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -193,7 +193,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -210,7 +210,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/github.type.ts b/packages/schemas/src/v3/github.type.ts index c0a0942d7..00c272ed6 100644 --- a/packages/schemas/src/v3/github.type.ts +++ b/packages/schemas/src/v3/github.type.ts @@ -85,23 +85,23 @@ export interface GithubConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/gitlab.schema.ts b/packages/schemas/src/v3/gitlab.schema.ts index 88d801013..97bd716b1 100644 --- a/packages/schemas/src/v3/gitlab.schema.ts +++ b/packages/schemas/src/v3/gitlab.schema.ts @@ -156,11 +156,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -177,7 +177,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -187,7 +187,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -204,7 +204,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/gitlab.type.ts b/packages/schemas/src/v3/gitlab.type.ts index 4e1113a53..a54cf5acf 100644 --- a/packages/schemas/src/v3/gitlab.type.ts +++ b/packages/schemas/src/v3/gitlab.type.ts @@ -80,23 +80,23 @@ export interface GitlabConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/index.schema.ts b/packages/schemas/src/v3/index.schema.ts index ab9ea09fd..f3987aebe 100644 --- a/packages/schemas/src/v3/index.schema.ts +++ b/packages/schemas/src/v3/index.schema.ts @@ -657,11 +657,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -678,7 +678,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -688,7 +688,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -705,7 +705,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -888,11 +888,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -909,7 +909,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -919,7 +919,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -936,7 +936,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1072,11 +1072,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1093,7 +1093,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1103,7 +1103,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1120,7 +1120,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1208,11 +1208,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1229,7 +1229,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1239,7 +1239,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1256,7 +1256,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1407,11 +1407,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1428,7 +1428,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1438,7 +1438,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1455,7 +1455,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1644,11 +1644,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1665,7 +1665,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1675,7 +1675,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1692,7 +1692,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", @@ -1742,11 +1742,11 @@ const schema = { }, "revisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1763,7 +1763,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -1773,7 +1773,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -1790,7 +1790,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/index.type.ts b/packages/schemas/src/v3/index.type.ts index 7b60fed0a..0a96be8fc 100644 --- a/packages/schemas/src/v3/index.type.ts +++ b/packages/schemas/src/v3/index.type.ts @@ -321,23 +321,23 @@ export interface GithubConnectionConfig { enforcePermissionsForPublicRepos?: boolean; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/packages/schemas/src/v3/shared.schema.ts b/packages/schemas/src/v3/shared.schema.ts index 12a86dc8c..390dd919c 100644 --- a/packages/schemas/src/v3/shared.schema.ts +++ b/packages/schemas/src/v3/shared.schema.ts @@ -35,11 +35,11 @@ const schema = { }, "GitRevisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -56,7 +56,7 @@ const schema = { }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -66,7 +66,7 @@ const schema = { }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -83,7 +83,7 @@ const schema = { }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", diff --git a/packages/schemas/src/v3/shared.type.ts b/packages/schemas/src/v3/shared.type.ts index 0c752c87c..3a8032040 100644 --- a/packages/schemas/src/v3/shared.type.ts +++ b/packages/schemas/src/v3/shared.type.ts @@ -22,26 +22,26 @@ export interface Shared { [k: string]: unknown; } /** - * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored. + * The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored. * * This interface was referenced by `Shared`'s JSON-Schema * via the `definition` "GitRevisions". */ export interface GitRevisions { /** - * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored. + * List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ branches?: string[]; /** - * Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp. */ branchSort?: "committerdate" | "creatordate" | "refname"; /** - * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored. + * List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions. */ tags?: string[]; /** - * Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. + * Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. */ tagSort?: "committerdate" | "creatordate" | "refname"; } diff --git a/schemas/v3/shared.json b/schemas/v3/shared.json index d0ac8aecb..996e3a100 100644 --- a/schemas/v3/shared.json +++ b/schemas/v3/shared.json @@ -34,11 +34,11 @@ }, "GitRevisions": { "type": "object", - "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", + "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed first. Sourcebot can index at most 64 total revisions per repository, including the default branch. Matching branches are considered before matching tags, and any revisions beyond the 64 revision limit are ignored.", "properties": { "branches": { "type": "array", - "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", + "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. Matching branches are considered before matching tags, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -55,7 +55,7 @@ }, "branchSort": { "type": "string", - "description": "Sort order to use before matching and truncating branches for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate branches before matching branch glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name. For branches, `creatordate` follows Git object creator-date semantics and is not a branch creation timestamp.", "enum": [ "committerdate", "creatordate", @@ -65,7 +65,7 @@ }, "tags": { "type": "array", - "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", + "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. Matching tags are considered after matching branches, and the combined default branch, branch, and tag revision list is capped at 64 total revisions.", "items": { "type": "string" }, @@ -82,7 +82,7 @@ }, "tagSort": { "type": "string", - "description": "Sort order to use before matching and truncating tags for indexing. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", + "description": "Sort order to use when listing candidate tags before matching tag glob patterns and applying the global 64 revision limit. Values map to Git `for-each-ref` sort keys. `committerdate` and `creatordate` sort newest-first, while `refname` sorts lexicographically by ref name.", "enum": [ "committerdate", "creatordate", From c32d8b63774bb80158e97495b0ec148153494d05 Mon Sep 17 00:00:00 2001 From: Divyam Talwar Date: Sun, 28 Jun 2026 09:48:42 +0530 Subject: [PATCH 4/4] Prove revision sort overrides repo config Strengthen the explicit revision sort regression tests so they fail if the sort argument is ignored and repo-local defaults would otherwise mask the behavior. Constraint: CodeRabbit found the explicit-sort tests inherited matching repo config defaults. Rejected: Change production git sort handling | existing implementation already passes --sort for branch and tag reads. Confidence: high Scope-risk: narrow Directive: Keep revision ordering tests configured so explicit sort options conflict with repo defaults. Tested: node .yarn/releases/yarn-4.7.0.cjs workspace @sourcebot/backend test src/git.test.ts Not-tested: Full monorepo test suite; change is limited to backend git regression tests. --- packages/backend/src/git.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/git.test.ts b/packages/backend/src/git.test.ts index 2229d6e61..f695d4295 100644 --- a/packages/backend/src/git.test.ts +++ b/packages/backend/src/git.test.ts @@ -95,6 +95,7 @@ describe("git ref ordering", () => { test("getTags supports sorting by ref name", async () => { const repoPath = await createTempRepo(); repoPaths.push(repoPath); + runGit(repoPath, ["config", "tag.sort", "creatordate"]); await commitFile({ repoPath, @@ -163,6 +164,7 @@ describe("git ref ordering", () => { test("getBranches supports sorting by ref name", async () => { const repoPath = await createTempRepo(); repoPaths.push(repoPath); + runGit(repoPath, ["config", "branch.sort", "committerdate"]); await commitFile({ repoPath,