Skip to content

Commit 5b4a776

Browse files
authored
UBERF-8522: Allow to use any assignee for github projects (#8178)
Signed-off-by: Andrey Sobolev <[email protected]>
1 parent ccef31b commit 5b4a776

File tree

6 files changed

+113
-80
lines changed

6 files changed

+113
-80
lines changed

Diff for: .github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ jobs:
479479
DOCKER_CLI_HINTS: false
480480
- name: Configure /etc/hosts
481481
run: |
482-
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
482+
sudo echo "127.0.0.1 huly.local" | sudo tee -a /etc/hosts
483483
- name: Prepare server
484484
run: |
485485
cd ./ws-tests

Diff for: .vscode/launch.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
// "GREEN_URL": "http://host.docker.internal:6767?token=secret",
8484
"SERVER_PORT": "3335",
8585
"METRICS_CONSOLE": "false",
86+
"DEBUG_PRINT_SQL": "true",
8687
"METRICS_FILE": "${workspaceRoot}/metrics.txt", // Show metrics in console evert 30 seconds.,
8788
"STORAGE_CONFIG": "minio|localhost?accessKey=minioadmin&secretKey=minioadmin",
8889
"SERVER_SECRET": "secret",
@@ -522,21 +523,21 @@
522523
"request": "launch",
523524
"args": ["src/index.ts"],
524525
"env": {
525-
"MONGO_URL": "mongodb://localhost:27017",
526+
"MONGO_URL": "mongodb://localhost:27018",
526527
"SERVER_SECRET": "secret",
527-
"ACCOUNTS_URL": "http://localhost:3000",
528+
"ACCOUNTS_URL": "http://localhost:3003",
528529
"APP_ID": "${env:POD_GITHUB_APPID}",
529530
"CLIENT_ID": "${env:POD_GITHUB_CLIENTID}",
530531
"CLIENT_SECRET": "${env:POD_GITHUB_CLIENT_SECRET}",
531532
"PRIVATE_KEY": "${env:POD_GITHUB_PRIVATE_KEY}",
532-
"COLLABORATOR_URL": "ws://localhost:3078",
533+
"COLLABORATOR_URL": "ws://huly.local:3079",
533534
"MINIO_ENDPOINT": "localhost",
534535
"MINIO_ACCESS_KEY": "minioadmin",
535536
"MINIO_SECRET_KEY": "minioadmin",
536537
"PLATFORM_OPERATION_LOGGING": "true",
537538
"FRONT_URL": "http://localhost:8080",
538539
"PORT": "3500",
539-
"STATS_URL": "http://host.docker.internal:4900"
540+
"STATS_URL": "http://host.docker.internal:4901"
540541
},
541542
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
542543
"sourceMaps": true,

Diff for: dev/prod/public/config-test.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"ACCOUNTS_URL": "/account",
3-
"COLLABORATOR_URL": "ws://localhost:3079",
3+
"COLLABORATOR_URL": "ws://huly.local:3079",
44
"UPLOAD_URL": "/files",
5-
"TELEGRAM_URL": "http://localhost:8088",
6-
"GMAIL_URL": "http://localhost:8089",
7-
"CALENDAR_URL": "http://localhost:8096",
5+
"TELEGRAM_URL": "http://huly.local:8088",
6+
"GMAIL_URL": "http://huly.local:8089",
7+
"CALENDAR_URL": "http://huly.local:8096",
88
"REKONI_URL": "/rekoni",
99
"GITHUB_APP": "uberflow-dev",
1010
"GITHUB_CLIENTID": "Iv1.43f9cac43bd68617",
11-
"GITHUB_URL": "http://localhost:3501",
11+
"GITHUB_URL": "http://huly.local:3500",
1212
"LAST_NAME_FIRST": "true",
13-
"PRINT_URL": "http://localhost:4006",
14-
"SIGN_URL": "http://localhost:4006",
15-
"ANALYTICS_COLLECTOR_URL": "http://localhost:4018",
16-
"AI_URL": "http://localhost:4011",
13+
"PRINT_URL": "http://huly.local:4006",
14+
"SIGN_URL": "http://huly.local:4006",
15+
"ANALYTICS_COLLECTOR_URL": "http://huly.local:4018",
16+
"AI_URL": "http://huly.local:4011",
1717
"BRANDING_URL": "/branding.json",
1818
"VERSION": null,
1919
"MODEL_VERSION": null,
20-
"STATS_URL": "http://localhost:4901",
20+
"STATS_URL": "http://huly.local:4901",
2121
"PASSWORD_STRICTNESS": "none"
2222
}

Diff for: services/github/model-github/src/index.ts

+20-17
Original file line numberDiff line numberDiff line change
@@ -916,23 +916,26 @@ export function createModel (builder: Builder): void {
916916
actions: [view.action.Delete, task.action.Move, tracker.action.MoveToProject]
917917
})
918918

919-
builder.createDoc(presentation.class.DocRules, core.space.Model, {
920-
ofClass: tracker.class.Issue,
921-
fieldRules: [
922-
{
923-
field: 'assignee',
924-
query: {},
925-
mixin: github.mixin.GithubIssue,
926-
fieldQuery: {
927-
[github.mixin.GithubUser + '.url']: { $exists: true }
928-
},
929-
fieldQueryFill: {},
930-
allowConflict: false,
931-
disableUnset: true,
932-
disableEdit: true
933-
}
934-
]
935-
})
919+
// TODO: Need rework this functionality, for now we need to allow set any user,
920+
// and github integration will skip change of field if value is not have a proper mixin instead.
921+
922+
// builder.createDoc(presentation.class.DocRules, core.space.Model, {
923+
// ofClass: tracker.class.Issue,
924+
// fieldRules: [
925+
// {
926+
// field: 'assignee',
927+
// query: {},
928+
// mixin: github.mixin.GithubIssue,
929+
// fieldQuery: {
930+
// [github.mixin.GithubUser + '.url']: { $exists: true }
931+
// },
932+
// fieldQueryFill: {},
933+
// allowConflict: false,
934+
// disableUnset: true,
935+
// disableEdit: true
936+
// }
937+
// ]
938+
// })
936939

937940
builder.mixin(github.class.DocSyncInfo, core.class.Class, core.mixin.IndexConfiguration, {
938941
indexes: [],

Diff for: ws-tests/.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
22
BACKUP_STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
33
BACKUP_BUCKET_NAME=ws-dev-backups
4-
DB_URL=mongodb://mongodb:27018
5-
DB_EU_URL=postgresql://root@cockroach:26257/defaultdb?sslmode=disable
4+
DB_URL=mongodb://huly.local:27018
5+
DB_EU_URL=postgresql://root@huly.local:26258/defaultdb?sslmode=disable

0 commit comments

Comments
 (0)