Skip to content

Commit 46a0ec3

Browse files
Esievesunlei
authored andcommitted
feat: CircleCI
1 parent 04720e5 commit 46a0ec3

File tree

2 files changed

+14
-34
lines changed

2 files changed

+14
-34
lines changed

server/node-service/src/plugins/circleCi/circleCi.spec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9870,6 +9870,12 @@
98709870
},
98719871
{
98729872
"name": "Webhook"
9873+
},
9874+
{
9875+
"name": "Project"
9876+
},
9877+
{
9878+
"name": "Schedule"
98739879
}
98749880
]
98759881
}

server/node-service/src/plugins/circleCi/index.ts

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,12 @@ const dataSourceConfig = {
1212
type: "dataSource",
1313
params: [
1414
{
15-
type: "groupTitle",
16-
key: "api_key_header",
17-
label: "Api Key Auth",
15+
"type": "password",
16+
"key": "api_key_header.value",
17+
"label": "Personal API Token",
18+
"tooltip": "[Personal API Token](https://circleci.com/docs/managing-api-tokens/#creating-a-personal-api-token)"
1819
},
19-
{
20-
type: "password",
21-
key: "api_key_header.value",
22-
label: "Circle-Token",
23-
},
24-
{
25-
type: "groupTitle",
26-
key: "basic_auth",
27-
label: "HTTP Basic Auth",
28-
},
29-
{
30-
type: "textInput",
31-
key: "basic_auth.username",
32-
label: "Username",
33-
tooltip: "Basic auth username",
34-
placeholder: "<Basic Auth Username>",
35-
},
36-
{
37-
type: "password",
38-
key: "basic_auth.password",
39-
label: "Password",
40-
tooltip: "Basic auth password",
41-
placeholder: "<Basic Auth Password>",
42-
},
43-
],
20+
]
4421
} as const;
4522

4623
const parseOptions: ParseOpenApiOptions = {
@@ -54,19 +31,16 @@ type DataSourceConfigType = ConfigToType<typeof dataSourceConfig>;
5431
const circleCiPlugin: DataSourcePlugin<any, DataSourceConfigType> = {
5532
id: "circleCi",
5633
name: "CircleCI",
57-
icon: "circleCi.svg",
34+
icon: "circleCI.svg",
5835
category: "api",
5936
dataSourceConfig,
6037
queryConfig: async () => {
61-
const { actions, categories } = await parseOpenApi(
62-
spec as unknown as OpenAPI.Document,
63-
parseOptions
64-
);
38+
const { actions, categories } = await parseOpenApi(spec as unknown as OpenAPI.Document, parseOptions);
6539
return {
6640
type: "query",
6741
label: "Action",
6842
categories: {
69-
label: "Category",
43+
label: "Resources",
7044
items: categories,
7145
},
7246
actions,

0 commit comments

Comments
 (0)