-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathv2.ts
195 lines (193 loc) · 5.96 KB
/
v2.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
// THIS IS A AUTO-GENERATED FILE. DO NOT MODIFY MANUALLY!
export type Repos = GitHubConfig | GitLabConfig | GiteaConfig | LocalConfig;
/**
* A Sourcebot configuration file outlines which repositories Sourcebot should sync and index.
*/
export interface SourcebotConfigurationSchema {
$schema?: string;
/**
* Defines a collection of repositories from varying code hosts that Sourcebot should sync with.
*/
repos?: Repos[];
}
export interface GitHubConfig {
/**
* GitHub Configuration
*/
type: "github";
/**
* A Personal Access Token (PAT).
*/
token?:
| string
| {
/**
* The name of the environment variable that contains the token.
*/
env: string;
};
/**
* The URL of the GitHub host. Defaults to https://github.com
*/
url?: string;
/**
* List of users to sync with. All repositories that the user owns will be synced, unless explicitly defined in the `exclude` property.
*/
users?: string[];
/**
* List of organizations to sync with. All repositories in the organization visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property.
*/
orgs?: string[];
/**
* List of individual repositories to sync with. Expected to be formatted as '{orgName}/{repoName}' or '{userName}/{repoName}'.
*/
repos?: string[];
exclude?: {
/**
* Exclude forked repositories from syncing.
*/
forks?: boolean;
/**
* Exclude archived repositories from syncing.
*/
archived?: boolean;
/**
* List of individual repositories to exclude from syncing. Glob patterns are supported.
*/
repos?: string[];
};
revisions?: GitRevisions;
}
/**
* The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed.
*/
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.
*/
branches?: string[];
/**
* 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.
*/
tags?: string[];
}
export interface GitLabConfig {
/**
* GitLab Configuration
*/
type: "gitlab";
/**
* An authentication token.
*/
token?:
| string
| {
/**
* The name of the environment variable that contains the token.
*/
env: string;
};
/**
* The URL of the GitLab host. Defaults to https://gitlab.com
*/
url?: string;
/**
* Sync all projects visible to the provided `token` (if any) in the GitLab instance. This option is ignored if `url` is either unset or set to https://gitlab.com .
*/
all?: boolean;
/**
* List of users to sync with. All projects owned by the user and visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property.
*/
users?: string[];
/**
* List of groups to sync with. All projects in the group (and recursive subgroups) visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property. Subgroups can be specified by providing the path to the subgroup (e.g. `my-group/sub-group-a`).
*/
groups?: string[];
/**
* List of individual projects to sync with. The project's namespace must be specified. See: https://docs.gitlab.com/ee/user/namespace/
*/
projects?: string[];
exclude?: {
/**
* Exclude forked projects from syncing.
*/
forks?: boolean;
/**
* Exclude archived projects from syncing.
*/
archived?: boolean;
/**
* List of projects to exclude from syncing. Glob patterns are supported. The project's namespace must be specified, see: https://docs.gitlab.com/ee/user/namespace/
*/
projects?: string[];
};
revisions?: GitRevisions;
}
export interface GiteaConfig {
/**
* Gitea Configuration
*/
type: "gitea";
/**
* An access token.
*/
token?:
| string
| {
/**
* The name of the environment variable that contains the token.
*/
env: string;
};
/**
* The URL of the Gitea host. Defaults to https://gitea.com
*/
url?: string;
/**
* List of organizations to sync with. All repositories in the organization visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property. If a `token` is provided, it must have the read:organization scope.
*/
orgs?: string[];
/**
* List of individual repositories to sync with. Expected to be formatted as '{orgName}/{repoName}' or '{userName}/{repoName}'.
*/
repos?: string[];
/**
* List of users to sync with. All repositories that the user owns will be synced, unless explicitly defined in the `exclude` property. If a `token` is provided, it must have the read:user scope.
*/
users?: string[];
exclude?: {
/**
* Exclude forked repositories from syncing.
*/
forks?: boolean;
/**
* Exclude archived repositories from syncing.
*/
archived?: boolean;
/**
* List of individual repositories to exclude from syncing. Glob patterns are supported.
*/
repos?: string[];
};
revisions?: GitRevisions;
}
export interface LocalConfig {
/**
* Local Configuration
*/
type: "local";
/**
* Path to the local directory to sync with. Relative paths are relative to the configuration file's directory.
*/
path: string;
/**
* Enables a file watcher that will automatically re-sync when changes are made within `path` (recursively). Defaults to true.
*/
watch?: boolean;
exclude?: {
/**
* List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.
*/
paths?: string[];
};
}