UBERF-8522: Allow to use any assignee for github projects (#8178)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-03-10 01:17:48 +07:00 committed by GitHub
parent ccef31b16e
commit 5b4a7760ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 113 additions and 80 deletions

View File

@ -479,7 +479,7 @@ jobs:
DOCKER_CLI_HINTS: false
- name: Configure /etc/hosts
run: |
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 huly.local" | sudo tee -a /etc/hosts
- name: Prepare server
run: |
cd ./ws-tests

9
.vscode/launch.json vendored
View File

@ -83,6 +83,7 @@
// "GREEN_URL": "http://host.docker.internal:6767?token=secret",
"SERVER_PORT": "3335",
"METRICS_CONSOLE": "false",
"DEBUG_PRINT_SQL": "true",
"METRICS_FILE": "${workspaceRoot}/metrics.txt", // Show metrics in console evert 30 seconds.,
"STORAGE_CONFIG": "minio|localhost?accessKey=minioadmin&secretKey=minioadmin",
"SERVER_SECRET": "secret",
@ -522,21 +523,21 @@
"request": "launch",
"args": ["src/index.ts"],
"env": {
"MONGO_URL": "mongodb://localhost:27017",
"MONGO_URL": "mongodb://localhost:27018",
"SERVER_SECRET": "secret",
"ACCOUNTS_URL": "http://localhost:3000",
"ACCOUNTS_URL": "http://localhost:3003",
"APP_ID": "${env:POD_GITHUB_APPID}",
"CLIENT_ID": "${env:POD_GITHUB_CLIENTID}",
"CLIENT_SECRET": "${env:POD_GITHUB_CLIENT_SECRET}",
"PRIVATE_KEY": "${env:POD_GITHUB_PRIVATE_KEY}",
"COLLABORATOR_URL": "ws://localhost:3078",
"COLLABORATOR_URL": "ws://huly.local:3079",
"MINIO_ENDPOINT": "localhost",
"MINIO_ACCESS_KEY": "minioadmin",
"MINIO_SECRET_KEY": "minioadmin",
"PLATFORM_OPERATION_LOGGING": "true",
"FRONT_URL": "http://localhost:8080",
"PORT": "3500",
"STATS_URL": "http://host.docker.internal:4900"
"STATS_URL": "http://host.docker.internal:4901"
},
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"sourceMaps": true,

View File

@ -1,22 +1,22 @@
{
"ACCOUNTS_URL": "/account",
"COLLABORATOR_URL": "ws://localhost:3079",
"COLLABORATOR_URL": "ws://huly.local:3079",
"UPLOAD_URL": "/files",
"TELEGRAM_URL": "http://localhost:8088",
"GMAIL_URL": "http://localhost:8089",
"CALENDAR_URL": "http://localhost:8096",
"TELEGRAM_URL": "http://huly.local:8088",
"GMAIL_URL": "http://huly.local:8089",
"CALENDAR_URL": "http://huly.local:8096",
"REKONI_URL": "/rekoni",
"GITHUB_APP": "uberflow-dev",
"GITHUB_CLIENTID": "Iv1.43f9cac43bd68617",
"GITHUB_URL": "http://localhost:3501",
"GITHUB_URL": "http://huly.local:3500",
"LAST_NAME_FIRST": "true",
"PRINT_URL": "http://localhost:4006",
"SIGN_URL": "http://localhost:4006",
"ANALYTICS_COLLECTOR_URL": "http://localhost:4018",
"AI_URL": "http://localhost:4011",
"PRINT_URL": "http://huly.local:4006",
"SIGN_URL": "http://huly.local:4006",
"ANALYTICS_COLLECTOR_URL": "http://huly.local:4018",
"AI_URL": "http://huly.local:4011",
"BRANDING_URL": "/branding.json",
"VERSION": null,
"MODEL_VERSION": null,
"STATS_URL": "http://localhost:4901",
"STATS_URL": "http://huly.local:4901",
"PASSWORD_STRICTNESS": "none"
}

View File

@ -916,23 +916,26 @@ export function createModel (builder: Builder): void {
actions: [view.action.Delete, task.action.Move, tracker.action.MoveToProject]
})
builder.createDoc(presentation.class.DocRules, core.space.Model, {
ofClass: tracker.class.Issue,
fieldRules: [
{
field: 'assignee',
query: {},
mixin: github.mixin.GithubIssue,
fieldQuery: {
[github.mixin.GithubUser + '.url']: { $exists: true }
},
fieldQueryFill: {},
allowConflict: false,
disableUnset: true,
disableEdit: true
}
]
})
// TODO: Need rework this functionality, for now we need to allow set any user,
// and github integration will skip change of field if value is not have a proper mixin instead.
// builder.createDoc(presentation.class.DocRules, core.space.Model, {
// ofClass: tracker.class.Issue,
// fieldRules: [
// {
// field: 'assignee',
// query: {},
// mixin: github.mixin.GithubIssue,
// fieldQuery: {
// [github.mixin.GithubUser + '.url']: { $exists: true }
// },
// fieldQueryFill: {},
// allowConflict: false,
// disableUnset: true,
// disableEdit: true
// }
// ]
// })
builder.mixin(github.class.DocSyncInfo, core.class.Class, core.mixin.IndexConfiguration, {
indexes: [],

View File

@ -1,5 +1,5 @@
STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
BACKUP_STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
BACKUP_BUCKET_NAME=ws-dev-backups
DB_URL=mongodb://mongodb:27018
DB_EU_URL=postgresql://root@cockroach:26257/defaultdb?sslmode=disable
DB_URL=mongodb://huly.local:27018
DB_EU_URL=postgresql://root@huly.local:26258/defaultdb?sslmode=disable

View File

@ -2,6 +2,8 @@ services:
mongodb:
image: 'mongo:7-jammy'
command: mongod --port 27018
extra_hosts:
- 'huly.local:host-gateway'
environment:
- PUID=1000
- PGID=1000
@ -10,6 +12,8 @@ services:
restart: unless-stopped
cockroach:
image: cockroachdb/cockroach:latest-v24.2
extra_hosts:
- 'huly.local:host-gateway'
ports:
- '26258:26257'
command: start-single-node --insecure
@ -17,6 +21,8 @@ services:
minio:
image: 'minio/minio'
command: server /data --address ":9000" --console-address ":9001"
extra_hosts:
- 'huly.local:host-gateway'
expose:
- 9000
- 9001
@ -27,6 +33,8 @@ services:
image: 'elasticsearch:7.14.2'
expose:
- 9200
extra_hosts:
- 'huly.local:host-gateway'
ports:
- 9201:9200
environment:
@ -45,6 +53,8 @@ services:
- mongodb
- minio
- cockroach
extra_hosts:
- 'huly.local:host-gateway'
ports:
- 3003:3003
volumes:
@ -55,14 +65,16 @@ services:
- ADMIN_EMAILS=admin
- ACCOUNT_PORT=3003
- SERVER_SECRET=secret
- DB_URL=mongodb://mongodb:27018
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334,ws://transactor-europe:3335;ws://localhost:3335;europe,
- DB_URL=mongodb://huly.local:27018
- TRANSACTOR_URL=ws://huly.local:3334;ws://huly.local:3334,ws://huly.local:3335;ws://huly.local:3335;europe,
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://stats:4901
- STATS_URL=http://huly.local:4901
workspace:
image: hardcoreeng/workspace
extra_hosts:
- 'huly.local:host-gateway'
links:
- mongodb
- minio
@ -75,14 +87,16 @@ services:
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- REGION=
- ACCOUNTS_URL=http://account:3003
- ACCOUNTS_URL=http://huly.local:3003
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://stats:4901
- STATS_URL=http://huly.local:4901
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
- BACKUP_BUCKET=${BACKUP_BUCKET_NAME}
restart: unless-stopped
workspace_europe:
image: hardcoreeng/workspace
extra_hosts:
- 'huly.local:host-gateway'
links:
- cockroach
- minio
@ -95,14 +109,16 @@ services:
- DB_URL=${DB_EU_URL}
- STORAGE_CONFIG=${STORAGE_CONFIG}
- MODEL_ENABLED=*
- ACCOUNTS_URL=http://account:3003
- ACCOUNTS_URL=http://huly.local:3003
- BRANDING_PATH=/var/cfg/branding.json
- STATS_URL=http://stats:4901
- STATS_URL=http://huly.local:4901
- BACKUP_STORAGE=${BACKUP_STORAGE_CONFIG}
- BACKUP_BUCKET=${BACKUP_BUCKET_NAME}
restart: unless-stopped
restart: unless-stopped
front:
image: hardcoreeng/front
extra_hosts:
- 'huly.local:host-gateway'
pull_policy: never
links:
- account
@ -118,21 +134,23 @@ services:
environment:
- SERVER_PORT=8083
- SERVER_SECRET=secret
- ACCOUNTS_URL_INTERNAL=http://account:3003
- ACCOUNTS_URL=http://localhost:3003
- ACCOUNTS_URL_INTERNAL=http://huly.local:3003
- ACCOUNTS_URL=http://huly.local:3003
- UPLOAD_URL=/files
- ELASTIC_URL=http://elastic:9200
- GMAIL_URL=http://localhost:8088
- CALENDAR_URL=http://localhost:8095
- REKONI_URL=http://rekoni:4007
- TELEGRAM_URL=http://localhost:8086
- COLLABORATOR_URL=ws://localhost:3079
- ELASTIC_URL=http://huly.local:9201
- GMAIL_URL=http://huly.local:8088
- CALENDAR_URL=http://huly.local:8095
- REKONI_URL=http://huly.local:4007
- TELEGRAM_URL=http://huly.local:8086
- COLLABORATOR_URL=ws://huly.local:3079
- STORAGE_CONFIG=${STORAGE_CONFIG}
- BRANDING_URL=http://localhost:8083/branding-test.json
- STATS_URL=http://stats:4901
- STATS_API=http://localhost:4901
- BRANDING_URL=http://huly.local:8083/branding-test.json
- STATS_URL=http://huly.local:4901
- STATS_API=http://huly.local:4901
transactor:
image: hardcoreeng/transactor
extra_hosts:
- 'huly.local:host-gateway'
pull_policy: never
links:
- mongodb
@ -147,21 +165,23 @@ services:
environment:
- REGION=
- SERVER_PORT=3334
- SERVER_SECRET=secret
- SERVER_SECRET=secret
- DB_URL=${DB_URL}
- METRICS_CONSOLE=false
- METRICS_FILE=metrics.txt
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://localhost:8083
- ACCOUNTS_URL=http://account:3003
- COLLABORATOR_URL=http://collaborator:3079
- FRONT_URL=http://huly.local:8083
- ACCOUNTS_URL=http://huly.local:3003
- COLLABORATOR_URL=http://huly.local:3079
- LAST_NAME_FIRST=true
- BRANDING_PATH=/var/cfg/branding.json
- FULLTEXT_URL=http://fulltext:4710
- STATS_URL=http://stats:4901
- FULLTEXT_URL=http://huly.local:4710
- STATS_URL=http://huly.local:4901
- ENABLE_COMPRESSION=true
transactor-europe:
image: hardcoreeng/transactor
extra_hosts:
- 'huly.local:host-gateway'
pull_policy: never
links:
- elastic
@ -176,21 +196,23 @@ services:
environment:
- SERVER_PORT=3335
- REGION=europe
- SERVER_SECRET=secret
- SERVER_SECRET=secret
- DB_URL=${DB_EU_URL}
- METRICS_CONSOLE=false
- METRICS_FILE=metrics.txt
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FRONT_URL=http://localhost:8083
- ACCOUNTS_URL=http://account:3003
- COLLABORATOR_URL=http://collaborator:3079
- FRONT_URL=http://huly.local:8083
- ACCOUNTS_URL=http://huly.local:3003
- COLLABORATOR_URL=http://hult-local:3079
- LAST_NAME_FIRST=true
- BRANDING_PATH=/var/cfg/branding.json
- FULLTEXT_URL=http://fulltext:4710
- STATS_URL=http://stats:4901
- ENABLE_COMPRESSION=true
- FULLTEXT_URL=http://huly.local:4710
- STATS_URL=http://huly.local:4901
- ENABLE_COMPRESSION=true
collaborator:
image: hardcoreeng/collaborator
extra_hosts:
- 'huly.local:host-gateway'
links:
- mongodb
- minio
@ -200,21 +222,24 @@ services:
environment:
- COLLABORATOR_PORT=3079
- SECRET=secret
- ACCOUNTS_URL=http://account:3003
- ACCOUNTS_URL=http://huly.local:3003
- STORAGE_CONFIG=${STORAGE_CONFIG}
- FULLTEXT_URL=http://fulltext:4710
- STATS_URL=http://stats:4901
- FULLTEXT_URL=http://huly.local:4710
- STATS_URL=http://huly.local:4901
restart: unless-stopped
rekoni:
image: hardcoreeng/rekoni-service
extra_hosts:
- 'huly.local:host-gateway'
restart: on-failure
ports:
- 4007:4004
environment:
- STATS_URL=http://stats:4901
- STATS_URL=http://huly.local:4901
fulltext:
image: hardcoreeng/fulltext
extra_hosts:
- "huly.local:host-gateway"
restart: unless-stopped
links:
- elastic
@ -227,14 +252,16 @@ services:
- PORT=4710
- SERVER_SECRET=secret
- DB_URL=${DB_URL}
- FULLTEXT_DB_URL=http://elastic:9200
- FULLTEXT_DB_URL=http://huly.local:9201
- ELASTIC_INDEX_NAME=local_storage_index
- STORAGE_CONFIG=${STORAGE_CONFIG}
- REKONI_URL=http://rekoni:4007
- ACCOUNTS_URL=http://account:3003
- STATS_URL=http://stats:4901
- REKONI_URL=http://huly.local:4007
- ACCOUNTS_URL=http://huly.local:3003
- STATS_URL=http://huly.local:4901
fulltext-europe:
image: hardcoreeng/fulltext
extra_hosts:
- "huly.local:host-gateway"
restart: unless-stopped
links:
- elastic
@ -248,17 +275,19 @@ services:
- REGION=europe
- SERVER_SECRET=secret
- DB_URL=${DB_EU_URL}
- FULLTEXT_DB_URL=http://elastic:9200
- FULLTEXT_DB_URL=http://huly.local:9201
- ELASTIC_INDEX_NAME=local_eu_storage_index # Use different one to be able to check migration is working
- STORAGE_CONFIG=${STORAGE_CONFIG}
- REKONI_URL=http://rekoni:4007
- ACCOUNTS_URL=http://account:3003
- STATS_URL=http://stats:4901
- REKONI_URL=http://huly.local:4007
- ACCOUNTS_URL=http://huly.local:3003
- STATS_URL=http://huly.local:4901
stats:
image: hardcoreeng/stats
extra_hosts:
- "huly.local:host-gateway"
ports:
- 4901:4901
environment:
- PORT=4901
- SERVER_SECRET=secret
restart: unless-stopped
restart: unless-stopped