43 Commits

Author SHA1 Message Date
Alex Tugarev
e4ccbf0b4d
GetAuthenticatedUser in Dashboard (#19142)
* [dashboard] remove unused service mock

* [dashboard] use `GetAuthenticatedUser` instead of `getLoggedInUser`

* fixup: override workspaceAutostartOptions

also fix toDurationString call

* fixup: move `isOnboardingUser` to dashboard

* fixup: move getProfile from protocol to common

* fixup fromWorkspaceAutostartOption

* move getPrimaryEmail to common and clean up

* rm getProfile from protocol, use ProfileDetails

* fixup missing leeway dependencies

* fix getPrimaryEmail

* fix resetting workspace timeout

* [gitpod-db] remove dependency to `@gitpod/public-api-common`

* cleanup BUILD.yaml
2023-12-06 17:42:14 +02:00
Alex Tugarev
612b919699
[server] Extract ScmService to be used by both APIs (#19098)
* [server] add ScmService to be used by ScmServiceAPI (and WS API)

* add simple test for `getToken`

* refactor `ScmService.getToken` to return token of undefined

* fix duplicata validation

* add api converter tests

* just some docs
2023-11-22 16:27:00 +02:00
Sven Efftinge
4c35db7587
Add "more elements" hint to repo search. (#19016) 2023-11-06 23:41:45 +02:00
Sven Efftinge
59fb058cac
[dashboard] deduplicate repositories (#19013) 2023-11-05 18:24:43 +02:00
Filip Troníček
391266cd94
Fix ?until in BBS commit contexts (#18987)
* Fix `?until` in BBS commit contexts

* force branch name

* Change test name
2023-10-31 14:02:38 +02:00
Sven Efftinge
ae38d86476
[linting] Enable eslint/no-unsafe-argument (#18965) 2023-10-23 12:20:31 +03:00
Brad Harris
d2872f527d
adding create project modal (#18871)
* adding create project modal

* setting up portal w/ popover for dropdown

* Fixing issues with trying to display dropdown in a portal

* cleanup and adding filling in create project modal a bit

* Adding some git auth functionality

* add project id for now

* remove github logic that checks all repos

* reload projects when we create a new one

* fixing repo sorting to handle multiple projects better

* fill in repo name for projects

* excluding projects in repo results

* handling all new project buttons

* refactor Dropdown2 to use radix popover

* use radix css var for width

* remove project distinction for now

* maintain focus on search input

* adjusting validation logic on repo when creating a project

* remove scmService from server impl

* set project name on backend for now

* make w-full again

* simplify

* implement hasReadAccess for BBS

* remove canInstallWebhook and GitHub app check during webhook installation

* moving project validation into project service

* simplify

* ui cleanup

* handle case where there is no repoProvider

* mock repositoryProvider.hasReadAccess

* missed a Project.slug removal

* ui cleanup per feedback

* adding script to start on other port for local fe dev flow
2023-10-13 21:59:21 +03:00
Brad Harris
306061da1a
Load recent repos and not all repos for BBS (#18861)
* getting recent repos instead of all repos

* stale comment

* wrap recent repos w/ repo search flag check
2023-10-05 06:15:13 +03:00
Brad Harris
def4633256
Implement searchRepos for Bitbucket (#18856)
* implementing searchRepositories

* implement searchRepos for BBS

* limit fields

* remove fields

* adding gitlab searchRepos

* remove gitlab searchRepos - not working will do in a followup

* wrap calls w/ asyncBatch to limit concurrency
2023-10-03 17:25:12 +03:00
Brad Harris
89af3c0871
Adding searchRepositories jsonrpc method (#18827)
* adding searchRepositories method w/ github impl

* fix a few things and add bbs impl for searchRepos

* integrate searchRepositories in RepositoryFinder

* adjusting loading indicators

* cleanup

* wrap repository search behind feature flag

* Changing queries for github repo search

* fix enabled to use debounced value

* fix org filters

* drop variables for query

* fixing encoding
2023-09-29 22:28:08 +03:00
Brad Harris
0bc9cb3c6e
Add projects to repository finder (#18706)
* adding repository name

* updating options a bit

* add repositoryName to the response

* update styling

* updating sorting for getSuggestedRepositories and adding tests

* update sorting logic

* tweaking sorting more

* don't show middot when no name is available

* rename type for consistency

* adding aria label

* prioritize projects above user repos

* handle selected projects better

* fix gray icon color
2023-09-19 16:38:58 +02:00
Jean Pierre
b24ae9495d
Upgrade jsonwebtoken lib (#18634) 2023-09-06 19:16:03 +02:00
Huiwen
a05af0cc2e
[bbs] update REPO_WRITE permission check EXP-521 (#18610)
* [bbs] fallback REPO_WRITE permission check to bbs

* Use repos search api

* Add test cases
2023-09-04 12:58:01 +02:00
Alex Tugarev
d6e1866704
undo limit to fetch the first 100 user repos for New Workspace – EXP-554 (#18644)
* undo limit to fetch the first 100 user repos for New Workspace

this reverts 2f2b1abbf1 effectively

* don't call getSuggestedContextURLs on each setUser call

* Always cap the respository search results to be rendered on New Workspace
2023-09-04 09:34:01 +02:00
Brad Harris
25c949e976
Incremental repo searching (#18566)
* Wiring up api repo searching for bitbucket server

* adding lodash.debounce dep

* add lodash.debounce types

* Hiding account for bitbucket server

* print host only

* adjust loading state to not be totally blocking

* adjust filtering and query key

* support fetching recent repos

* use search params instead of strings

* adjusting loading component

* cleanup

* wrap incremental search code w/ feature flag

* yarn lock updates

* adding a limit to grab only the first 100 repos

* rename for clarity

* change to call in series to reduce rate limit chances

* renaming cap => maxPages

* fixing some stuttering widths changing as things load

* add alert message for bbs searching
2023-08-24 00:36:49 +02:00
Huiwen
6d7f32d841
[bbs] fix incorrect revision fetch EXP-496 (#18572)
* [bbs] fix incorrect revision fetch

* Fixup

* fixup

* 1

* Revert tests and address feedback

* fixup
2023-08-22 14:18:48 +02:00
Alex Tugarev
3ba583c710
[server] add searchString to getRepositoriesForAutomatedPrebuilds – EXP-461 (#18533)
* [server] add `searchString` to `getRepositoriesForAutomatedPrebuilds`

* reintroduce and fix paginated requests

* using a default cap at 10 requests per paginated request

* make getProviderRepositoriesForUser cancellable
2023-08-17 15:04:43 +02:00
Alex Tugarev
4df0250739
[bbs] add pagination to getRepos – EXP-417 EXP-416 (#18498)
* [bbs] add pagination to getRepos

* fixup: a fuse to prevent infinite loop

* fixup remove .only
2023-08-14 12:12:40 +02:00
Alex Tugarev
9e5a2be333
[new-workspace] Fix recent repositories for BBS – EXP-411 (#18497)
* [new-workspace] Fix recent repositories for BBS

* fixup remove log

* fixup test
2023-08-14 11:34:40 +02:00
Alex Tugarev
e99800d804
[server] fix Suggested Context URLs for BBS (#18451)
* add repositories of all accessible projects
* remove user repositories from Apps (wrong permission query)
* implement `getUserRepos` for BBS
2023-08-08 08:54:33 +02:00
Sven Efftinge
075e14c47f
[build] enabled some eslint rules (#18165) 2023-07-04 22:32:21 +08:00
Gero Posmyk-Leinemann
cc52d25280
Upgrade yarn packages (#18128)
* [ts] Pin mimimatch and minimist

* [server] Update minio

* [ts] Remove superfluous node-pre-gyp dep

* [ts] Pin jsonwebtoken to 9.0.0

* [grpc] Update grpc-toolsis

* [ts] Upgrade from mocha-typescript to  @testdeck/mocha

* fix rimraf
2023-07-03 14:47:19 +08:00
Alex Tugarev
4fd4f66667
Remove unused workspace port auth (#17870)
* remove unused worspace port auth

* fix
2023-06-13 14:27:03 +08:00
Milan Pavlik
03f8134046
[server] Use JWTs for Sign-in flow state WEB-365 (#17628)
* [server] Use JWTs for Sign-in flow state

* rerun

* fix

* fix

* fix

* fix

* fix

* fix

* Fix

* retest

* fix

* fix
2023-05-23 18:52:57 +08:00
Anton Kosyakov
8f1640ed0b
[supervisor-frontend] fix metrics reporting (#17361)
* [supervisor-frontend] fix metrics reporting

when workspace URL contains search, hash or path

* ensure that GitpodHostUrl always trim search, hash, path

+ remove unused arg type and function
2023-04-28 02:55:36 +08:00
Milan Pavlik
e77764216c
[server] Move prebuilds out of EE (#17354)
* [server] Move prebuilds out of EE

* fix
2023-04-25 15:22:46 +08:00
Milan Pavlik
6602594ee8
[server] Remove languages provider (#17279)
* [server] Remove languages provider

* fix
2023-04-19 00:01:51 +08:00
Alex Tugarev
a657f94767
[server] clean up auth provider (#17238)
removing dead code.
2023-04-17 23:56:49 +08:00
Milan Pavlik
b7ff32a61a
[server] Fix execution of unit tests (#17046)
* [server] yarn test should just work

* fix

* Fix

* fix

* fix

* precommit

* [server] Fix express-util.spec.ts

* remove changes to package

* fix PAT tests

* fix

* fix

* fix

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2023-03-27 15:55:25 +02:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
Alex Tugarev
3450b2ec36 [bitbucket-server] improve logging of webhook installation 2022-11-03 07:55:07 +01:00
Alex Tugarev
542e7c9463 [bitbucket-server] fix parsing of branch name
Context URLs of BitBucket Server may include a search param "at" to specify a branch fully qualified. GItpod's context parser results are expected to provide a simple "ref" name for branches.
2022-10-11 10:59:26 +02:00
Alex Tugarev
79f2c21f6a [server] log less errors 2022-05-20 16:53:34 +05:30
Alex Tugarev
0c11cdc83e [bitbucket-server] handle pull-request context url 2022-04-25 20:38:37 +05:30
Alex Tugarev
ef14acda54 [bitbucket-server] add to Git Integrations UI 2022-04-12 23:49:26 +05:30
Alex Tugarev
0f5f121372 [server] sanitize logging 2022-04-12 19:46:25 +05:30
Alex Tugarev
d7f1255dcd [bitbucket-server] add token validator 2022-04-08 18:21:22 +05:30
Alex Tugarev
76b51bc224 [bitbucket-server] support for projects and prebuilds 2022-04-04 14:07:17 +05:30
Milan Pavlik
45f13cf8e9 Format components/server with prettier 2022-03-14 21:30:24 +05:30
Sven Efftinge
cc2f3b30fe [multi-repo] Support prebuilds on multi-repo setup 2022-03-10 15:46:17 +05:30
Gero Posmyk-Leinemann
92e8a6d767 [server] Explicitly set timeouts for all fetch() requests 2022-02-21 22:34:01 +05:30
Jan Keromnes
2d443923f2 [server] Restrict snapshot access based on repository access
Also refactor:
- Simplify GuardedSnapshot.workspace
- WorkspaceLogAccessGuard → RepositoryResourceGuard
- RepositoryService.canAccessHeadlessLogs → RepositoryProvider.hasReadAccess
2022-02-21 15:47:01 +05:30
Alex Tugarev
e205b485c3 [server] add basic support for BitBucket Server 2022-02-16 21:04:56 +01:00