Commit Graph

67 Commits

Author SHA1 Message Date
Johannes Batzill
e354f560a5 Replace QueryParamAsPositiveInt64 with QueryParamAsPositiveInt64OrDefault where the parameter is optional (#191) 2023-07-13 05:46:16 +00:00
Abhinav Singh
23f299fb64 techdebt: [CODE-318]: remove commits v2 2023-06-07 12:26:26 -07:00
Akhilesh Pandey
24a9888cfc feat: Update HTTP status code to 201 when returning from successful create operations 2023-06-01 15:09:17 +05:30
Abhinav Singh
a0ce4fe88e feat: [CODE-345]: rename enhancement and committer addition 2023-05-23 18:02:31 -07:00
atefeh
c88de09a2a code cleaning 2023-05-22 17:04:30 -07:00
Abhinav Singh
a6615c91a2 feat: [CODE-200]: list commits with date filter 2023-05-17 15:22:59 -07:00
Abhinav Singh
7f6947f0ea feat: [CODE-200]: list commits with date filter 2023-05-17 14:37:19 -07:00
Abhinav Singh
943708dcc7 feat: [CODE-200]: list commits with date filter 2023-05-17 01:39:35 -07:00
Enver Bisevac
7c6a28ecd1 Merge branch 'ap/add-tag-api' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#36) 2023-05-16 15:35:52 +00:00
Akhilesh Pandey
527b3e18fa Add Validate to Service and Handler 2023-05-15 22:14:55 +05:30
Akhilesh Pandey
f41b918129 feat: [CODE-199]: Update success status code to 204 2023-05-12 22:04:10 +05:30
Abhinav Singh
59a7cdf8a8 feat: [CODE-260]: commit api should have path filter 2023-05-08 22:54:00 -07:00
Johannes Batzill
0de0d2fcef updating permission check to april milestone 2023-04-19 09:24:38 -07:00
Enver Bisevac
fffb37bfa2 Merge branch 'eb/rbac' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#25) 2023-04-19 15:29:46 +00:00
Johannes Batzill
89bb0f6b99 update gitRPC getBlob api to stream blob content, add 'raw' api. 2023-04-18 11:39:59 -07:00
Enver Bisevac
b092c1b8df added go-rbac dependency 2023-04-18 03:10:30 +02:00
Enver Bisevac
5c266ad78f fix for merge-check response 2023-03-30 20:51:25 +02:00
Enver Bisevac
75ec201c2b Merge branch 'eb/gitrpc_error_handling' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#8) 2023-03-21 10:19:21 +00:00
Marko Gaćeša
c7c36e49e1 Add git blame API (#346) 2023-03-09 12:55:23 +01:00
Enver Bisevac
56d8f304a6 gitrpc error handling - initial work 2023-03-06 16:36:19 +01:00
Enver Bisevac
82b8679d6f [fix] diff-stats api returns total commits and files changed in compare branches (#323) 2023-02-13 00:47:23 +01:00
Enver Bisevac
13a456e357 [scm-58] Add merge-check and Integrate with PR (#318)
Co-authored-by: Johannes Batzill <johannes.batzill@harness.io>
2023-02-11 23:22:12 -08:00
Johannes Batzill
c5d92b498b [API] Add GetCommit API (#291) 2023-02-01 18:50:54 -08:00
Johannes Batzill
fe83493623 [API] Add GetBranch API (#290) 2023-02-01 18:13:27 -08:00
Johannes Batzill
335998505e [MISC] Introduce PathStore and Move PathLogic to Controller Layer (#226)
This change is a follow up on the effort to remove transactions and sync stores from the database layer, and move them in the application layer. It is addressing the repo + space store.
The following changes are included:
- Introduce PathStore storing resource paths (repo + space)
- Add foreign key from path.repo_id/space_id to repo.id/space.id
- Add foreign key from repo/space.parent_id to space.id
- Remove repo_sync and space_sync
- Move path creation logic to repo/space controller (for both creating primary paths for new repos/spaces, as well as creating alias spaces)
- Reimplement repo/space moving on controller layer
2023-01-18 11:34:12 -08:00
Johannes Batzill
2006f769c9 [Webhook] Add url.Provider, Add principal to branch webhooks (#163) 2023-01-06 01:57:26 -08:00
Johannes Batzill
6c567b38d0 [MISC] Move GitRPC to Read/WriteRequest, Update Create/Delete Branch to use Push, Setup githook Symlink, Accept Incoming X-Request-Id (#157) 2023-01-05 11:03:35 -08:00
Johannes Batzill
7ada1af3aa [API] Add after Support to Commit Listing (#155) 2023-01-04 16:59:43 -08:00
Enver Bisevac
22b0595476 initial work on raw diff (#129) 2022-12-22 14:30:31 +01:00
Enver Bisevac
630c9b553f ordering imports linter and writer (#85) 2022-11-22 23:42:39 +01:00
Enver Bisevac
ad619c7e3c [feat]ability to commit files using REST api (#82)
* initial work on commit files

* minor improvements, grpc server interceptors and more

* compare file old sha and current sha

* added some validation steps

* config immutable, introduce temp repos dir

* handler added to standalone

* fix CI linter, fix minor bug on update

* wire generator files
2022-11-22 19:24:40 +01: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
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
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
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
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
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
Enver Bisevac
e24c2192eb repo path fixed on gitrpc server 2022-11-09 00:10:55 +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
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
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
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
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