14 Commits

Author SHA1 Message Date
Huiwen
394dcae20f
[papi,server] implement restricted_workspace_classes in server (#19481)
* [papi,server] implement `restricted_workspace_classes` in server

* Fix test case input

* nit
2024-02-28 22:37:09 +02:00
Alex Tugarev
b2260d021e
Migrate Prebuild settings – EXP-672 (#18842)
* [protocol] Add PrebuildSettings to ProjectSettings

* add migration function

* add migration function and test

* update protocol helper functions

* update prebuild manager

* use new prebuild setting in frontend

* update papi

* fix papi test

* rename var

* fix papi mapping

* deprecation note

* update migration function

* fix prebuild-manager

* fixup server

* fix Enable Prebuilds on Project Settings

* Use Project.getPrebuildSettings
and

* fix countUnabortedPrebuildsSince

* improve usage of default settings

* fix Build Branches select

* fix papi conversion 🤯

* don't save empty pattern strings

* fix papi-server conversion and align naming of prebuild settings

* fix getPrebuildSettings

* [prebuilds] changed prebuild semantics

- no more incremental prebuilds
- always incremental workspace
- never wait for running prebuilds

---------

Co-authored-by: svenefftinge <sven@gitpod.io>
2023-10-05 17:37:13 +03:00
Alex Tugarev
df155ad0e9
Match branch names by pattern – EXP-575 (#18734)
* turn text input into select input

* mimic old behavior for pre-existing projects

* explicit settings under the project should have precedence

* add PrebuildBranchPattern to project settings

* add branch name pattern to project settings page

* fixup c&p error

* match branch names by glob pattern

* fix pattern matching

* fix project settings form

* fix initial value for prebuildBranchPattern

* adding more tests

* add globstar tes

* fixup rebase error

* Apply suggestions from code review

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>

* fine tune debounce wait

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-22 13:57:01 +02:00
Alex Tugarev
252992223d
Add prebuildDefaultBranchOnly setting – EXP-574 (#18716)
* add `prebuildDefaultBranchOnly` to `Project.settings`

* evaluate prebuildDefaultBranchOnly in PrebuildManager

* add "Prebuild the default branch only" checkbox

* fix missin PAPI mapping 🤯

* fix PrebuildDefaultBranchOnly in gitpod-service.go

* turn text input into select input

* update styles on project settings page

* mimic old behavior for pre-existing projects

* use getPrebuildBranchStrategy in PrebuildManager

* add tests for PrebuildManager.prebuildPrecondition

* fix getPrebuildEvents

* explicit settings under the project should have precedence

* render changes to project settings immediately
2023-09-22 11:59:01 +02:00
Alex Tugarev
cb3a7f00c6
Add "Enable Prebuilds" to Project Settings – EXP-573 (#18698)
* cleanup: remove obsolete remainings of /prebuild prefix

* Add Project.settings.enablePrebuilds

* PrebuildManager.shouldPrebuild to consider Project.settings.enablePrebuilds

* Don't install webhooks on project creation

* foreseeable change: don't prefetch project details

* fix: unused imports

* redirect to project settings on project created

* don't trigger prebuilds on project created

* fix: get rid of many ListProjects requests on Settings page

* Project Settings: add checkbox for "enable prebuilds"

* handle "enable prebuilds" in server

* updating PAPI

* fixup

* fixup

* make PrebuildManager require a Project to work on

* also SCM webhook handlers
* move project usage registration to PrebuildManager

* address feedback on useListProjectsQuery and  useCurrentProject

* remove empty class name attributes

* make use of <InputField> as wrapper for <SelectWorkspaceClassComponent>

* fixup <SelectWorkspaceClassComponent> width

* update hint on "Enable Prebuilds" action

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>

* fix "enablePrebuild" handling

* add [Enable Prebuilds] button to "Project Created" page

* show detailed prebuild setting only if prebuilds are enabled

* drive-by: fix max width on "Remove Project"

* fix: re-add `loading` state to `useCurrentProject` hook

this caused an issue with loading components as `useListProjectsQuery.isLoading` is false initially.

* add "Enable Prebuilds" to project card

* fixup project-context.tsx

state should only be updated if `useListProjectsQuery` is loaded.

* fixup button type

* add hint to create a .gitpod.yml

* Apply suggestions from code review

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>

* remove unnecessary !

* extract Project.isPrebuildsEnabled

* fixup: add missing await

* render "Learn more" if not enabled, too.

* fix getCloneUrl for BBS

* fix getCloneUrl for GitLab

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-15 09:07:54 +02:00
Sven Efftinge
71912f721b
Allow renaming project (#18630)
remove project#slug
2023-09-04 09:42:01 +02:00
Sven Efftinge
caf26b812d
[server] remove getUserProjects (#18093) 2023-06-29 16:30:47 +08:00
Milan Pavlik
59ff034d6f
[public-api] Use context logger (#16686)
* Fix

* Fix

* Fix

* Fix

* Fix

* [public-api] Use context logger

* fix

* Fix

* fix

* Fix

* fix

* fix

* fix

* fix

* fix

* Fix

* fmt

* fix

* retest
2023-03-15 13:52:07 +01:00
Milan Pavlik
1dc48fbc23 [teams] Remove slug usage 2023-02-07 07:51:44 +01:00
Milan Pavlik
58a06943f6 [papi] Refactor valdiation functions to a file 2023-01-17 11:26:25 +01:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
Milan Pavlik
4fe78b14b5 [public-api] Implement ProjectsService.DeleteProject 2022-12-08 12:01:19 -03:00
Milan Pavlik
fbe70ea109 [public-api] Implement ProjectsService.ListProjects 2022-11-24 07:12:53 -03:00
Milan Pavlik
0d759f7a66 [public-api] Implement ProjectsService.CreateProject 2022-11-23 10:58:53 -03:00