Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit b152ae4

Browse files
Merge pull request #4 from topcoder-platform/develop
Sync master with develop
2 parents 19a6179 + 892c08b commit b152ae4

11 files changed

+3804
-98
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ dist
115115
.yarn/install-state.gz
116116
.pnp.*
117117

118-
1-create-users.csv
119-
2-users-with-skills.csv
118+
*.csv
119+
*.env

.vscode/launch.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "create skills",
9+
"program": "${workspaceFolder}/create-skills.js",
10+
"envFile": "${workspaceFolder}/.env",
11+
"request": "launch",
12+
"skipFiles": [
13+
"<node_internals>/**"
14+
],
15+
"type": "pwa-node"
16+
},
17+
{
18+
"type": "node",
19+
"request": "launch",
20+
"name": "Launch Program",
21+
"skipFiles": [
22+
"<node_internals>/**"
23+
],
24+
"program": "${workspaceFolder}/index.js",
25+
"envFile": "${workspaceFolder}/.env"
26+
}
27+
]
28+
}

config/custom-environment-variables.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
"AUTH0_CLIENT_ID": "AUTH0_CLIENT_ID",
88
"AUTH0_CLIENT_SECRET": "AUTH0_CLIENT_SECRET",
99
"AUTH0_AUDIENCE": "AUTH0_AUDIENCE",
10+
"AUTH0_TOPCODER_AUDIENCE": "AUTH0_TOPCODER_AUDIENCE",
1011
"TOKEN_CACHE_TIME": "TOKEN_CACHE_TIME",
11-
"SLEEP_LENGTH": "SLEEP_LENGTH"
12+
"SLEEP_LENGTH": "SLEEP_LENGTH",
13+
"GROUPS_API_URL": "GROUPS_API_URL",
14+
"USERS_API_URL": "USERS_API_URL",
15+
"UBAHN_USERS_API_URL": "UBAHN_USERS_API_URL",
16+
"MEMBERS_API_URL": "MEMBERS_API_URL",
17+
"ES": {
18+
"HOST": "ES_HOST",
19+
"API_VERSION": "ES_API_VERSION",
20+
"USER_INDEX": "ES_USER_INDEX",
21+
"USER_TYPE": "ES_USER_TYPE",
22+
"USER_GROUP_PROPERTY_NAME": "ES_USER_GROUP_PROPERTY_NAME"
23+
}
1224
}

config/default.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
"AUTH0_CLIENT_ID": "",
88
"AUTH0_CLIENT_SECRET": "",
99
"AUTH0_AUDIENCE": "https://u-bahn.topcoder.com",
10+
"AUTH0_TOPCODER_AUDIENCE": "https://m2m.topcoder-dev.com/",
1011
"TOKEN_CACHE_TIME": 86400000,
11-
"SLEEP_LENGTH": 3000
12-
}
12+
"SLEEP_LENGTH": 3000,
13+
"GROUPS_API_URL": "https://api.topcoder-dev.com/v5/groups",
14+
"USERS_API_URL": "https://api.topcoder-dev.com/v3/users",
15+
"MEMBERS_API_URL": "https://api.topcoder-dev.com/v5/members",
16+
"UBAHN_USERS_API_URL": "https://api.topcoder-dev.com/v5/users",
17+
"ES": {
18+
"HOST": "http://localhost:9200",
19+
"API_VERSION": "7.4",
20+
"USER_INDEX": "user",
21+
"USER_TYPE": "_doc",
22+
"USER_GROUP_PROPERTY_NAME": "groups"
23+
}
24+
}

create-skills.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ async function createSkill() {
3232
console.log(`${i}: ${name}`)
3333

3434
try {
35-
3635
await axios.post(url, {
3736
skillProviderId,
3837
name
@@ -43,6 +42,7 @@ async function createSkill() {
4342
})
4443
} catch (error) {
4544
console.log(`Error for skill: '${name}'`)
45+
console.log(error)
4646
console.log(error.message)
4747
fails[fails.length] = { postion: i, name}
4848
}

data/taas-skills.json

Lines changed: 430 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)