116 Commits

Author SHA1 Message Date
Marko Gaćeša
f1644f8e98 fixed headers write when handling openapi.yaml (#76) 2022-11-17 10:31:29 +01:00
Tan Nhu
7116c2fbe4 Implement Create Branch (#78)
* Update new icons

* Implement Create Branch
2022-11-17 00:16:57 -08:00
Johannes Batzill
60f0ea969d [API] Add API For Commit Divergence Calulation (#77)
This commit contains the following changes:
- Add `commits/calculate_divergence` API to calculate commit divergence of reference pairs
- Rename `serviceAccounts` to `service_accounts` to follow REST best practices
2022-11-16 16:53:31 -08:00
Tan Nhu
f204a5a2f8 Fix double ? in API URL (#75) 2022-11-15 13:21:31 -08:00
Enver Bisevac
86716b4a0c [bug] authentication on push to public repo (#74)
* authentication on push to public repo

* receivepack or uploadpack this should also be enum.PermissionRepoEdit or enum.PermissionRepoView

* accountID used for realm
2022-11-15 21:59:58 +01:00
Tan Nhu
782c6f2bd7 Refactor type system + add flow to copy/edit/delete a file (#73)
* Fix double query

* Add file toolbar buttons + wire up copy, delete, etc...

* Refactor type system
2022-11-15 02:42:59 -08:00
Enver Bisevac
07a630c40b repoStore findref fixed 2022-11-14 13:08:28 +01:00
Tan Nhu
5ab69952e2 Disable caching and sniffing via HTTP headers for UI main entry resources (#72) 2022-11-13 20:18:07 -08:00
Enver Bisevac
93fc430776 [bug] git clone/pull/push auth using Basic Authorization fixed (#66)
* git clone/pull/push auth using Basic Authorization fixed

* use api key as git login

* middleware renamed to RequiredInGitPath

* remove requiredingitpath middleware

* requested changes

* requested changes

* minor code cleanup
2022-11-11 07:59:32 +01:00
Johannes Batzill
681e1f1c14 [SWAGGER] Add create/delete branch swagger, fix existing swagger (#71)
This change includes the following:
- add swagger for create / delete branch api
- remove `json` tag from fields of swagger objects that only occur in the path
2022-11-10 21:21:38 -08:00
Johannes Batzill
c55c53deab [API] Add Create + Delete Branch API (+ Basic GIT Error Propagation) (#70)
This change adds the following:
- create / delete branch
- basic error propagation from git to user (notfound, conflict, invalidinput)
- create repo root folder in server instead of service constructor
2022-11-10 20:57:31 -08:00
Tan Nhu
81040d0453 Fix double query (#69) 2022-11-10 17:46:07 -08:00
Tan Nhu
31a58e3172 Add routingId to support Harness gateway + Prototype for Commit modal (#68)
* Implement file path edit input

* Implement file path edit input - cont

* Prototype for Commit modal

* Add routingId to support Harness gateway
2022-11-10 15:17:55 -08:00
Johannes Batzill
c8cee4d250 [Misc] Preparation for Container Deployment (#67)
This change is fixing our docker file which is used to build our harness code image used for PR deployments.
Furthermore, the change contains some logging improvements that were added along the way of setting up the PR environment.
2022-11-09 23:03:40 -08:00
Tan Nhu
b93c0ce103 Update git clone URL (#65) 2022-11-08 19:45:38 -08:00
Johannes Batzill
ff2f949e78 add GITURL to repo apis list and create (#64)
- rename repo.url to repo.GitURL to avoid ambiguity
- add support to create / list api
- add default value (http://localhost:3000)
- remove handler backfilling host / port to simplify flow (can be added if needed)
2022-11-08 19:35:49 -08:00
Enver Bisevac
98436fb644 clone url implemented (#63)
Clone URL (http) used for clone/pull/push git operations
2022-11-08 18:32:01 -08:00
Tan Nhu
a418e5e94f Add some debugging info for PR deployment (#62)
* Add some debugging info for PR deployment

* Add some debugging info for PR deployment
2022-11-08 17:07:49 -08:00
Tan Nhu
93dbc6005f Correct API URL path + minor code editor change (#61)
* autoFocus editor

* Correct API URL path
2022-11-08 16:37:13 -08:00
Enver Bisevac
df76498bf5 Merge branch 'main' of github.com:harness/gitness 2022-11-09 00:11:57 +01:00
Enver Bisevac
e24c2192eb repo path fixed on gitrpc server 2022-11-09 00:10:55 +01:00
Tan Nhu
073154eebb Update clone URL + minor code refactoring (#60)
* FileEditor improvements

* Update clone URL + minor code refactoring
2022-11-08 14:34:43 -08:00
Johannes Batzill
8fe80ab811 Remove Identifier from UI - Replace with original Name (#59)
* remove identifier from UI and replace it with original 'Name'
* extend uid to length 100
* allow repo name of length 1
2022-11-07 14:37:50 -08:00
Tan Nhu
c7f852cbf4 Flow for edit file (#58) 2022-11-07 11:35:48 -08:00
Johannes Batzill
3ba0f75c8d Introduce UIDs for Space / Repo / Tokens, Add Custom Harness Validation, ... (#57)
This change adds the following:
- Space UID + Custom harness validation (accountId for top level space, harness identifier for child spaces)
- Repo UID + Custom harness validation (harness identifier)
- Store Unique casing of space / repo path and add Path.ValueUnique (with Unique index) to allow for application layer controlling the case sensitivity (case insensitive standalone vs partially case sensitive harness)
- Token UID (unique index over ownertype + ownerID + tokenUID)
- Add DisplayName for principals (replaces Name to avoid confustion)
- Store Unique casing of principal UID and add Principal.ValueUnique (with unique index) to allow for application layer, per principal type control of case sensitivity (required in embedded mode)
- Generate serviceAccount UID (+Email) Randomly (sa-{space|repo}-{ID}-{random}) - Allows to have a unique UID across all principals while reducing likelyhood of overlaps with users + avoid overlap across spaces / repos.
- Sync casing of space names (accountId orgId projectId) when creating spaces on the fly (to ensure case sensitivity of - harness code) or use the existing space to update casing.
- Update serviceaccount client to match updated NG Manager API
- in embedded mode create spaces for harness resources owning the service account
2022-11-06 23:14:47 -08:00
Tan Nhu
2fe8669119 Add clone tooltip (#56) 2022-11-06 12:39:14 -08:00
Enver Bisevac
20860ef399 [maint] app refactor, use proper package names (#53)
* app refactor, use proper package names

* minor changes

* use fat client interface, minor change on session

* initialize session and http client
2022-11-04 08:25:13 +01:00
Tan Nhu
0d5771d706 Implement Branches page (#55) 2022-11-04 00:22:21 -07:00
Tan Nhu
23e597758a Refactor: abstract parameters into hooks + add placeholders for branches and settings (#54) 2022-11-03 15:48:55 -07:00
Enver Bisevac
c607fd7b57 readme updated 2022-11-03 13:45:08 +01:00
Enver Bisevac
008e21009e ci-lint pipeline fix go version 1.17 -> 1.19 2022-11-03 13:30:41 +01:00
Enver Bisevac
578dd13d8d [maint] eb/gitrpc refactor (#51)
* pull/push impl done

* Basic auth for harness

* gitrpc as top level package

* New ctor for package

* gitrpcserver instead of server2
2022-11-03 13:17:03 +01:00
Tan Nhu
0bdae50be2 API integration for Commits page (#52) 2022-11-01 20:38:42 -07:00
Enver Bisevac
fb0e93394d [feat] pull/push over https - done (#47)
* pull/push impl done

* Basic auth for harness
2022-11-01 19:02:29 +01:00
Tan Nhu
3f7fc109d0 Branch search and styles (#50)
* Add LatestCommit component

* Add branches search

* Proper link for root
2022-11-01 00:53:46 -07:00
Johannes Batzill
2d4db78991 Add Tag Listing API (#49)
This change is adding the List Tags API. To do so, a few changes were necessary:
- Refactor List Branches on giteaAdapter / repo_service
- Expose WalkReferences via giteaAdapter
2022-10-28 13:10:26 -07:00
Tan Nhu
c21b860e46 Refactor: Use types from SCM Service (#48) 2022-10-27 00:57:20 -07:00
Tan Nhu
c8b978a6ed API integrations + simplify design (#46) 2022-10-25 03:25:46 -07:00
Johannes Batzill
2d897c4486 [MAINT] Add PAT CLI command and update readme (#45)
Add PAT CLI command and update readme
2022-10-24 22:50:33 -07:00
Johannes Batzill
c0258b34ef Add search capability to repo and space listing (for child spaces) (#44)
This change is adding search capability to the following apis:
- child repositories
- child spaces
*NOTE* The search space is limited to direct child repos/spaces.
2022-10-24 18:57:55 -07:00
Johannes Batzill
5337c46a4f Add Query and Sorting Capability to ListBranches API (#42)
This change adds the following to the list branches api:
- 'query' parameter for querying branches using arbitrary substrings
- 'sort' parameter for sorting the branches (name and date supported)
- 'direction' parameter for specifing the direction of the sorted output
2022-10-21 20:45:26 -07:00
Johannes Batzill
f655c2fae3 Add Standalone API to Harness Router (#40)
To simplify UI code we are going to expose both Harness API and Standalone API (restricted to harness embedded functionalities) when running in harness mode.

Furthermore, this PR adds a middleware that allows us to reuse standalone Handlers for Harness API for operations that don't require any request/response manipulation.
2022-10-19 18:35:40 -07:00
Johannes Batzill
743aee6029 [API] Add List Branches, Improve latestCommit Performance for listing directory (#38)
This commit has the following changes:
- API for listing branches
- Improve performance of content API for dir type responses with includeCommit=true
- swagger for git operations
- fix file names from camelCase to kebab_case
2022-10-17 23:05:50 -07:00
Johannes Batzill
e423ffda3c Fix Default Branch Creation (#37)
While the HEAD is pointed to the correct branch (might not exist), we created the initial files during repo creation still on the master branch (as it's an empty repo and clone by default sets up master when cloning an empty repo)
2022-10-17 19:09:46 -07:00
Enver Bisevac
41cbb6622f server urls added, resource moved to the root path (#35) 2022-10-18 02:24:20 +02:00
Johannes Batzill
7317ec9d62 Remove types dependency from gitrpc package, add back commits/content api (#36) 2022-10-17 17:12:52 -07:00
Johannes Batzill
0a7857f660 Fix License header to 2022 (#34) 2022-10-17 15:33:49 -07:00
Enver Bisevac
2b69b3d24a [MAINT] added repos endpoints to swagger (#33)
* added repos endpoints

* todo comments removed in create repo method
2022-10-18 00:10:36 +02:00
Johannes Batzill
91a75ed601 Add GetContent and ListCommits APIs, Fix DefaultBranch support (#32)
Adds the following:
- Add GetContent API (with gitrpc, proto, gitadapter changes)
- Add ListCommits API (with gitrpc, proto, gitadapter changes)
- DefaultBranch (to repo table in DB, update branch in git-repo, have default value in config)
2022-10-17 00:14:31 -07:00
Enver Bisevac
00647d7d1b [MAINT] golangci-lint config changed (#31)
* goheader linter added

* file header consistency
2022-10-13 14:39:15 +02:00